GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to find the places according to the distance(like in miles)  XML
Forum Index -> General
Author Message
sateesh



Joined: 02/09/2008 11:31:11
Messages: 5
Offline

Hi,
I have one problem in my work, in my work there is a need to find the near by places according to the given distance of a place. for example if we provide the geoname id of a place we have to display the all near by geoname ids acording to the given distance like 25 miles.

and what is "great circle distance".

Any one can please help in this regard.
bruce



Joined: 17/10/2008 16:14:53
Messages: 8
Location: South Africa
Offline

I found a very easy formula on the Dr Math forum.

http://www.mathforum.com/library/drmath/view/51711.html

I have used it to find the nearest weather station to a user entered lat/long and it works fine.
Hopefully is will be of use to you.
bruce



Joined: 17/10/2008 16:14:53
Messages: 8
Location: South Africa
Offline

I have found a much more substantial approach to distance.

Method 1
Great circle method. Assume that the earth is a perfect sphere and apply the spherical trigonometry equation. (see Dr Math)

Method 2
Vincenty’s formula. This is the most accurate and widely used globally-applicable model for the earth ellipsoid.

The full explanation of Method 2 and JavaScript code can be found at
www.movable-type.co.uk/scripts/latlong-vincenty.html
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team