vendredi 27 février 2015

ArcGIS. Coordinates conversion from WGS84 to Stereo70 is not precise


So I want to convert coordinates from WGS84 to Stereo 70 and it is not working precise. For example, I have the coordinates (20.2600, 43.6200) and in Stereo 70 should look like (448469.26,325966.67) but when I convert it, it gives me an error.


My line of code looks like:



Log.e("stereo70", " " + GeometryEngine.project(24.3512, 44.4316, SpatialReference.create(31700)));


Output: 448464.6330154536, 325965.9619150401 Which is about 10m away from the original point.


I have also tried a code provided in the answer:



Point p = new Point(24.3512, 44.4316);
Geometry projectedGeom = GeometryEngine.project(p, SpatialReference.create(SpatialReference.WKID_WGS84), SpatialReference.create(31700), GeographicTransformation.create(15995));
Point projectedP = (Point) projectedGeom;
Log.e("test", "X:" + projectedP.getX() + " Y:" + projectedP.getY());


Output: 448222.593914864 Y:325897.33784212614 Which is an error of about 100m.


How can I fix that?





Aucun commentaire:

Enregistrer un commentaire