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 get specific location!  XML
Forum Index -> General
Author Message
senioritta



Joined: 02/07/2010 14:36:15
Messages: 3
Offline

Given the wgs84_pos Point coordinates in an xml file like that:

<wgs84_pos:lat>18.8</wgs84_pos:lat>
<wgs84_pos:long>-69.6166667</wgs84_pos:long>

How can I know from geonames to which country and city do these coordinates belong?
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

http://ws.geonames.org/findNearbyPlaceName?lat=18.8&lng=-69.6166667

[WWW]
senioritta



Joined: 02/07/2010 14:36:15
Messages: 3
Offline

Thank you mark!

But how could you know this?
I want to write a program that can take the Point and returns the city and the state.
How can I access geonames ontology to query for the information?
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

It is very simple. If you look at the url then you will see that the latitude and longitude are part of the url:

http://ws.geonames.org/findNearbyPlaceName?lat=18.8&lng=-69.6166667


You can write the code to build the url from the coordinates and parse the result yourself. Or you can use a library for this:

http://www.geonames.org/export/client-libraries.html

[WWW]
senioritta



Joined: 02/07/2010 14:36:15
Messages: 3
Offline

thanks you very much
I appreciate ur help
bman2338



Joined: 19/07/2010 23:36:53
Messages: 1
Offline

I imported the Geonames dump into MySQL using another tutorial on the forums. I wondering if its possible to perform reverse geocoding on this dataset(effeciently!)?
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team