Search code examples
c#geolocationgeocodinggeography

How to expand a geographical square by 500 meters?


Let say I have a geographical square/rectangle where I have lat/lon definitions of the Northwest and Southeast corners.

I'd like to expand this square rectangle by 500 meters in each direction. What is the approach I should take? An example would be great.

P.S. Earth is not flat, as some would have us believe, so I am willing to live with the approximate model.


Solution

  • Find the conversion from minutes and seconds of arc to meters, convert, add, and convert back.

    Edit: The circumference of the Earth in meters is ~40,000,000 (original definition of meter). Since it looks like you need a solution for an arbitrary rectangle, assume a sphere and then 360 * 500 / 40,000,000 = 0.0045 degrees = 16.2 arc seconds is what you need to add to each side.