Hi Expert,
We were trying to integrate ESRI to SAP Work Manager application.
We refer "SAP® EAM and service mobile app SDK Installation Guide" for Building a GIS Client for Android.
We successfully build the GIS Client for Android.
While Geo tagging a location from mobile device data is captured in unit (meters) as below but we what it in unit (degree decimals).
How we can change this from meter to degree using ArcGIS SDK for Andriod?
Thanks in Advance.
Regards,
Shubham
Hi Shubham,
The points you have above are in the Web Mercator spatial reference. If you want to convert this to decimal degrees it is likely you want to be using the WGS84 spatial reference. Converting geometries from one spatial reference to another is easy and can be achieved generally in one line of code. You need to be looking at the project method on the GeometryEngine class.
In the code below I've recreated one of your points and converted it to WGS84 as an example.
// original point in web mercator Point webMercPoint = new Point(8615608,2661384,SpatialReferences.getWebMercator()); // convert to point to WGS 84 Point wgs84Point = (Point) GeometryEngine.project(webMercPoint, SpatialReferences.getWgs84()); // show wgs 84 coordinates System.out.println("wgs84 x:" + wgs84Point.getX() + " y:" + wgs84Point.getY());
Debug output is this:
wgs84 x:77.39532348382421 y:23.242604224773828
Does that help?
Thank you so much for your response.
I need to check since we are using it with SAP Work Manager.
Regards,
Shubham