Given a lat/lng coordinate, calculate the min and max lat/lng values for a 10 km area

前端 未结 2 1798
轮回少年
轮回少年 2021-01-01 00:50

Lets say I have a lat lng coordinate and I want to place that at the center of a square that is 10km wide and then get the minimum lat/lng and maximum lat/lng.

Is th

2条回答
  •  無奈伤痛
    2021-01-01 01:23

    How is the square oriented? Parallel to the equator? If so, then just do a bearing of 45 deg, 5km * sqrt(2) distance from your lat/lon to get the upper right corner. Similar for the bottom left, use a bearing of 225 deg.

    See Destination point given distance and bearing from start point at http://www.movable-type.co.uk/scripts/latlong.html

提交回复
热议问题