I have found a bug (?) in your projecting algorithmn which leads to a 200 meter error.
This line:
var wgs84 = (MapPoint) new MapPoint(-76819.429, 187725.102, SpatialReference.Create(31256) ).Project(SpatialReferences.Wgs84);
Calculates to:
{MapPoint[X=15.321529847554814, Y=46.82430179466435, Wkid=4326]}
As I know what feature on the satellite map should be there I see this is off.
In addition using https://products.aspose.app/gis/en/transformation for the projection leads to the correct 4326 values of
15.32549716745482 46.82433872507569
As I'm a novice in all this geo spatial stuff I may be using it wrong. But I can't see where...
Thanks for your help in advance
Solved! Go to Solution.
Does this projection require datum grid transformation? If so, did you supply the projection engine with the data necessary? See https://developers.arcgis.com/net/spatial-and-data-analysis/spatial-references/#grid-based-transform...
Does this projection require datum grid transformation? If so, did you supply the projection engine with the data necessary? See https://developers.arcgis.com/net/spatial-and-data-analysis/spatial-references/#grid-based-transform...
Hi,
Yeah... it seems I am missing the transformation for this projection.
Now with
var target = SpatialReference.Create(31256);
var transformation = TransformationCatalog.GetTransformation(target, SpatialReferences.Wgs84,
new Envelope(data.Min(a => a.X), data.Min(a => a.Y), data.Max(a => a.X), data.Max(a => a.Y), target));
...
var wgs84 = (MapPoint) new MapPoint(x, y, target).Project(SpatialReferences.Wgs84, transformation);
...
it delivers the correct values.
Thanks