ProjNet4GeoAPI
ProjNet4GeoAPI copied to clipboard
API issues to consider fixing for 3.0
Writing these up really quickly because it's really late in the morning for me...
TransformList(IList<double[]>)andTransform(double[])seem outdated- Since everything goes through
Transform(ref double x, ref double y, ref double z), we can probably get rid ofDimSourceandDimTarget?AffineTransformcould probably have its own non-abstractversions of these properties.
- All methods implemented via
throw new NotImplementedException()are unused, let's eliminate them XMLdoesn't seem to be used, yet everyMathTransformsubclass must implement it.- Forcing all implementations to provide a way to get
WKTfor their own instance is awkward. Is there a better way to accomplish this goal? - Do we need
Transform(double x, double y)/Transform(double x, double y, double z)when we could just point people to the versions that take inrefparameters?- Overloads that differ only by the presence / absence of
refaren't CLS-compliant.
- Overloads that differ only by the presence / absence of
- IMO we should strongly favor having separate overloads instead of default arguments the "z or no z?" case (
public void Transform(Span<XY> xys, Span<double> zs = default, int strideZ = 0)).- As-is, this clashes with the notion of "if you don't have Z, then don't pass in anything for Z". Even though you're not explicitly passing in a value in the C# source code, the caller is still providing a value, and it's still visible through IntelliSense.
- Subclasses should be required to implement at most one of either "invert myself" or "create an inverted copy of myself". IMO, we should drop
Invert().