Geographic math question
M5
m5 at RENEFOURNIER.COM
Thu Jun 28 14:09:42 PDT 2007
Not being very strong at math, I have a little problem that I'm not
sure how to solve. Maybe someone can help me.
Basically, given a point (latitude, longitude) and a radius (100
meters) (think circle), I need to compute an equivalent square: That
is, two points that would correspond to two corners of the square.
From: 51, -114 100 meters
To: 51.005, -114.005 NE corner
49.995, -113.995 SW corner
Now, the above is not really accurate, of course, since the earth is
spherical (well, at least most people think so), and I would like
this computation to run in MySQL query, e.g.:
UPDATE places SET ne_latitude = (*), ne_longitude = (*), sw_latitude
= (*), sw_longitude = (*)
In the above table, there are already three columns with the centre
latitude and longitude and radius. Any ideas? Thanks.
...Rene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070628/76ab7ae4/attachment.htm>
More information about the MapServer-users
mailing list