ProjNet4GeoAPI
ProjNet4GeoAPI copied to clipboard
Transform between the same coordinate system
Hi,
This libary is great! Great job.
In my case I am dealing with this CRS: https://epsg.io/2056 - it uses Hotine Oblique Mercator Azimuth Center projection, which is not supported. This is how I transform between CRS:
var trans = (new CoordinateTransformationFactory()).CreateFromCoordinateSystems(sourcePoint.CoordinateSystem, targetCoordinateSystem);
var sourcePointTemp = new[]
{
sourcePoint.LongitudeOrEasting,
sourcePoint.LatitudeOrNorthing
};
var targetPoint = trans.MathTransform.Transform(sourcePointTemp);
If both the source and the target CRS are the same, there is no transformation needed. I would expect that the transformation factory would just return the source point in this case. But instead, it throws an exception (because my CRS is not supported).
Would it make sense to change this behavior? i would be very happy to create a PR if you agree.
Thanks!