| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 02/01/2009 21:59:10
|
raf
Joined: 14/05/2007 12:33:47
Messages: 10
Offline
|
hi there,
i saw there are placemarks in the geonames db that are identified with codes ("HTL" for hotels for instance) : my question is 'is there a webservice to query the db on " 10 nearest hotels around lat=45,5&lng=5.6 ??' or will i have to dl the db on regular basis and do this on my server ?'
thanks a lot,
and thanks also for the work done and services offered !!
happy new year
raf.
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 02/01/2009 22:15:02
|
raf
Joined: 14/05/2007 12:33:47
Messages: 10
Offline
|
ok, i start to answer to myself, in case anyone else would be interested also :
i found that : http://ws.geonames.org/search?lat=45&lng=5&maxRows=5&fcode=htl
sends back only hotels, but apparently with nothing to do with the gps lat lng specified, as :
http://ws.geonames.org/search?lat=45&lng=55&maxRows=5&fcode=htl give the same five results...
so i know i can search the db on the 'htl' code to find hotels, but still have no clue on how to search around a given lat/lng...
any help still appreciated
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 03/01/2009 17:16:28
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
The search service does not take the lat/lng into consideration. What you are looking for are reverse geocoding services such as the findNearby service:
http://forum.geonames.org/gforum/posts/list/581.page#2667
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 08/01/2009 19:35:17
|
John Small
Joined: 24/04/2008 10:48:17
Messages: 12
Location: United Kingdom
Offline
|
I found that the easiest way to do this was to load the data into a database that has GIS extensions, such as Oracle, Postgresql or MySQL and then use the extensions to the SQL language to enable you to search nearest.
MySQL isn't very good because it assumes a flat geometry and you can only have GIS datatypes in their MyISAM tables.
|
John Small |
|
|
 |
|
|