GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
All places within one state (ADM1)  XML
Forum Index -> General
Author Message
sahertian



Joined: 30/11/2009 09:43:22
Messages: 10
Offline

Hi Marc,

How can I query all places within the ADM1 category... (and forget adm2 (counties etc..)

Example.. Give me all the places of the state OHIO...

There is also an adm2 but i am not interested in that..(except the places of course)

Thanks,
Ron Sahertian
marc



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

select * from geoname where admincode1='OH';

If you only want populate places:

select * from geoname where admincode1='OH' and featureClass='P';

[WWW]
sahertian



Joined: 30/11/2009 09:43:22
Messages: 10
Offline

Thanks for your answer Marc!


But, this is sql... can I do that also with xml from geonames.org?

Thanks,
Ron
marc



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

Ron

You are writing 'all' places. The xml interface is not meant to get the entire database or huge numbers of records. There are nearly 60000 toponyms in Ohio.
You can get the first of them with the web service:
http://ws.geonames.org/search?q=&maxRows=10&country=US&adminCode1=OH

Documentation:
http://www.geonames.org/export/geonames-search.html

Best

Marc

[WWW]
sahertian



Joined: 30/11/2009 09:43:22
Messages: 10
Offline

thanks Marc!
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team