Author |
Message |
04/07/2007 16:37:34
|
salocorgan69
Joined: 04/07/2007 16:35:28
Messages: 1
Offline
|
Hi there.
First and foremost thanks so much for providing this data.
I know the server side src code is sadly not available, but would you mind outlining the algorithm you use to get the results for the "Find nearby place name / reverse geocoding" function?
I need to implement this myself as we cannot call the webservice.
Any pointers appreciated.
|
|
|
30/10/2007 10:04:33
|
DARKHalf
Joined: 30/10/2007 09:57:37
Messages: 5
Offline
|
Hi, look there:
http://forum.geonames.org/gforum/posts/list/298.page
|
|
|
22/04/2009 07:55:09
|
stasiana
Joined: 22/04/2009 07:00:09
Messages: 4
Offline
|
The algorithm for reverse geocoding, or finding the nearest location point of interest, seems to be a long outstanding question. I don't think "use a geo-database" is the right answer. Poster is asking for the algorithm, not the implementation.
Here is one potential solution: Do a sinusoidal projection of the lat/lon points for the POI database. This projection effectively allows you to treat the projected coordinates as being on a Cartesian plane. Next, build a kd-tree with the projected coordinates. Search the kd-tree to find the nearest point of interest. In place of the kd-tree, you can also use a database (no need for one with geo features), and simply do a (x>a) and (x<b) and (y>c) and (y<d) to find POIs close to the target point.
|
|
|
25/04/2009 07:50:27
|
DARKHalf
Joined: 30/10/2007 09:57:37
Messages: 5
Offline
|
Hey, ok thats too far complicated...
Try this:
- One GPS Second is about 15 meters distance
- calculate a rough estimated distance of your radius as gps seconds
- do a lookup for all nearby places lying nearby in my rough radius
- run through that list and calculate exact distance with great circle distance algo from haversine
- is the place in range, copy to new list
- use the new list with all nearby places
|
|
|
|