In my Android app, I need to calculate the distance from a point (the device's location, which is a lat/lon coordinate) to a line (defined by two lat/lon coordinates), and get the result in meters.
I've taken a look at this page and the Java-code there, but I realize that I can't use that code (at least not with the lat/lon coordinates) because it will give me the distance/difference in degrees between the point and the line, and not in meters, and if I'm guessing right, it isn't possible to convert the difference in degrees to meters, right?
Therefore, I wonder how I can do this in another way, to get the distance in meters between a line and a point, both defined with lat/lon values.
Best regards
TheDDestroyer12
أكثر...
I've taken a look at this page and the Java-code there, but I realize that I can't use that code (at least not with the lat/lon coordinates) because it will give me the distance/difference in degrees between the point and the line, and not in meters, and if I'm guessing right, it isn't possible to convert the difference in degrees to meters, right?
Therefore, I wonder how I can do this in another way, to get the distance in meters between a line and a point, both defined with lat/lon values.
Best regards
TheDDestroyer12
أكثر...