Calculating bounding box a certain distance away from a lat/long coordinate in Java

后端 未结 6 2108
半阙折子戏
半阙折子戏 2020-11-28 23:47

Given a coordinate (lat, long), I am trying to calculate a square bounding box that is a given distance (e.g. 50km) away from the coordinate. So as input I have lat, long a

6条回答
  •  忘掉有多难
    2020-11-29 00:17

    I wrote an article about finding the bounding coordinates:

    http://JanMatuschek.de/LatitudeLongitudeBoundingCoordinates

    The article explains the formulae and also provides a Java implementation. (It also shows why IronMan's formula for the min/max longitude is inaccurate.)

提交回复
热议问题