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

Reply via email to