Reply
Thread Tools
Posts: 481 | Thanked: 190 times | Joined on Feb 2006 @ Salem, OR
#1
I made an application to access Geocode webservice from http://www.zeesource.net/maps/geocoding.do (to be used with winmapper and maemo-mapper). The application works fine and returns the coordinates for any city in world (one point). For the application to be useful I need to be able to calculate top left corner and bottom right corner... for a 50miles radius (for example). What is the formula to do this?

Thanks
-ioan

Last edited by ioan; 2006-10-10 at 20:50.
 
Posts: 373 | Thanked: 56 times | Joined on Dec 2005 @ Ottawa, ON
#2
Well ... a good ballpark place to start is to know that 1 arc-minute of latitude is 1 nautical mile at sea level. One arc-minute of longitude starts equal to this at the equator and decreases to zero at the poles by the cosine of the latitude.

This should give you a decent accuracy for just getting a rough box around a city.

lat+50nm = lat + 50*(1/60)deg

long+50nm = long + (50/cos(lat))*(1/60)deg

Realize that you are dividing by zero at the pole and there is no such thing as a latitude > 90 so limits have to be in place.

Or you can just stay in spherical coordinates ... I believe that is how Google maps tiles are arranged anyways being x deg of longitude wide and y deg of latitude high depending on the zoom level.

I recall there being a nice summary somewhere in the forum already ... probably written by gnuite. Might be difficult to locate since those maemo-mapper threads have taken on a life of their own :]
 
Posts: 95 | Thanked: 1 time | Joined on Sep 2005
#3
ioan, you might also be intersted in that: http://live.gnome.org/GeoClue
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:41.