Sunday, 16 December 2018

How to calculate new point coordinates from distance and angle using ArcGIS SDK for iOS?


I want to calculate the coordinates of a new point.


What I have: The source point coordinates, the distance (meters) and the angle


For example: I want to create a point within 100 meters and 45 degree from my source point


I use wgs84 as coordinate system. My question now is if it's possible to calculate a new point with the given attributes above and when its possible how I can do that.


I use the ArcGIS iOS SDK, but I haven't found any method in there to solve my problem.



Answer



If the data you will be using is on the scale of the given example, you can treat the problem and Earth as flat without significant accuracy loss. If that does not violate your use case, then calculate the metric shift for both dimensions like you had a triangle and convert it back to degrees. The only tricky part is that the longitude degrees are not of constant length (narrowing from the equator to the poles) and you have to multiply them by the cosine of the (freshly computed) latitude to compensate before using them as a conversion factor. You end up with the coordinate shift in degrees, which you then just add to the first point's coordinates.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...