Geospatial coordinates and distance in kilometers

后端 未结 5 1653
礼貌的吻别
礼貌的吻别 2020-12-02 11:31

This is a followup to this question.

I seem to be stuck on this. Basically, I need to be able to convert back and forth to referring to coordinates either in the st

5条回答
  •  天涯浪人
    2020-12-02 12:28

    I figured out the Big Problem with these formulae, aside from the implementation errors mentioned in the other answers and updates.

    The big problem was this: The Distance method (for computing the distance between two points) was computing great-circle distances. Which, of course, makes sense -- that's the shortest path between the two points. However, the great-circle distance between two points which lie on the same parallel (line of latitude) is NOT the same as the distance between those two points when traveling directly along the line of latitude, unless you're at the equator.

    So: the functions ARE working correctly; however, the alternative coordinate system I proposed in the original question requires that we look only at the distance north along the IDL followed by the distance east along the parallel at the resulting latitude. And calculating distance along a specific parallel is quite different from calculating distance along a great circle!

    Anyway, there you have it.

提交回复
热议问题