<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Not being very strong at math, I have a little problem that I'm not sure how to solve. Maybe someone can help me.<div><br class="webkit-block-placeholder"></div><div>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.</div><div><br class="webkit-block-placeholder"></div><div>From:<span class="Apple-tab-span" style="white-space:pre">        </span>51, -114<span class="Apple-tab-span" style="white-space:pre">                        </span>100 meters</div><div>To:<span class="Apple-tab-span" style="white-space:pre">                </span>51.005, -114.005<span class="Apple-tab-span" style="white-space:pre">        </span>NE corner</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>49.995, -113.995<span class="Apple-tab-span" style="white-space:pre">        </span>SW corner<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>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.:</div><div><br class="webkit-block-placeholder"></div><div>UPDATE places SET ne_latitude = (*), ne_longitude = (*), sw_latitude = (*), sw_longitude = (*)</div><div><br class="webkit-block-placeholder"></div><div>In the above table, there are already three columns with the centre latitude and longitude and radius. Any ideas? Thanks.</div><div><br class="webkit-block-placeholder"></div><div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-size: 16px; "><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 14px;">...Rene</span></font></div><div style="font-size: 16px; "><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br class="khtml-block-placeholder"></span></font></div><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br class="Apple-interchange-newline"></span></font></span></span> </div><br></div></body></html>