问题
How to find a set of lat/long pairs surrounding a 5 miles radius of a certain location expressed in lat/long or as a address.
回答1:
First you decide how many (lat,lon) pairs you want to have:
You could want to have 4 cordinates forming a square arround the center point.
Or you decide to have a regualr N-Gon around the center point.
Then you use a projection from lat/lon to meters, e.g EquiDistantProjetion.
This allows you to transform the lat/lon center to cartesian meters,
where you then can calculate like you have learned it in school.
Now you having the center point in cartesian meters:
Then you use the Polar coordinate form of a coordinate (r, phi) to calculate the corner points of the square or N-gon.
(centerX + r* sin(phi), centerY + r* cos(phi)).
Finally you have to use the inverse tranformation to transform your coordinate pairs back to lat/lon.
The EquiDistantProjection works for distances up to some 100 miles. It does not work well above 80 deg latitude. (Polar region)
来源:https://stackoverflow.com/questions/13599044/how-to-find-a-set-of-lat-long-pairs-surrounding-a-5-miles-radius-of-a-certain-lo