GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
webservice for "hotels nearby" from gps coordinates ?  XML
Forum Index -> General
Author Message
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.
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
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

[WWW]
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
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team