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 is the service CountryCode working?  XML
Forum Index -> FAQ - frequently asked questions
Author Message
dutchnomad



Joined: 19/03/2007 11:59:55
Messages: 3
Offline

I want to retrieveout the country code in the same way as the webservice
countrycode is working. From the dumps of the database files it is
unclear for me to find how the countrycode is found based on lat/lon
like in:

http://ws.geonames.org/countrycode?lat=47.03&lng=10.2

We want to implement a service like this locally to avoid load on the
geonames server by calling the webservice.


Does anyone now this algorithm??


Dutchnomad


marc



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

Hi Duchnomad

The reverse countrycode service is only using the dumps as a fallback. The normal way of operating is to use polygons with the country shapes.

Cheers

Marc

[WWW]
dutchnomad



Joined: 19/03/2007 11:59:55
Messages: 3
Offline

Are these polygons available? Who knows a source?
marc



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

This file looks like it has what you need judging from the file name :
http://mappinghacks.com/data/cntry98.zip

[WWW]
dutchnomad



Joined: 19/03/2007 11:59:55
Messages: 3
Offline

That looks promising. In what way I can interact with these shape files to find out what country a lat/lon combination is in?

I have only a viewer that shows the countries.
daniel



Joined: 23/08/2010 09:37:33
Messages: 3
Offline

Hi!

I have the same problem as dutchnomad at the moment.

@dutchnomad/ marc: Is there any further information on how to handle these shape files? What I would be more interested in: Where is the polygon data that geonames uses from? Is there any way to get this data/ are the polygon coordinates published by geonames?

Please advice.

Thanks,
Daniel
 
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team