How to convert EPSG:3857 to EPSG:4326 in Sdk Java

5895
1
02-09-2019 01:06 AM
RafaelPaz
New Contributor

Hi, would like to know if there's a way to convert  EPSG:3857 to EPSG:4326 in esri Sdk?

Basically, I have a Point passing a y and x like this with Spatial Reference being web mercator (3857): 

 Point point1 = new  Point(1.7040237624799997e7,-3099509.4953500014, SpatialReferences.getWebMercator());

   

Then I have another point with Spatial Reference WGS 84 (4326):

Point point2 = new Point(153.089361, -26.802295, SpatialReferences.getWgs84()); 

I need to convert the web mercator point (point1) to wgs 84 and get the lat/long of this point.

How can I achieve that? spent 3 days searching, but couldn't find anything on esri docs. Found 

CoordinateFormatter class, but couldn't see how it could help.

Please, any help would be much much appreciated!

cheers.

0 Kudos
1 Reply
nita14
by
Occasional Contributor III

Dear Rafael,

You should use GeometryEngine class for that. Check it here: GeometryEngine| arcgis-java and Project—ArcGIS Runtime SDK for Java | ArcGIS for Developers 

Hope this helps.

Adam

0 Kudos