GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
getParent/getChildren  XML
Forum Index -> Administrative Divisions
Author Message
mcjennis



Joined: 06/04/2007 23:37:04
Messages: 14
Offline

Hi Marc,
I have a question for you. Do you think it would be possible for you to create two new webservices:
- getParent (geonameId) returning the geoId of the parent division
- getChildren(geonameId) returning the list that contains all geoIds

It will solve a lot of problems for my project.

thank you very much,
fabrizio
marc



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

Hi Fabrizio

There is a service called hierarchy that returns all ancestors of a geonameId. Here the hierarchy for Segesta :
Europe > Italian Republic > Regione Autonoma Siciliana > Provincia di Trapani > Calatafimi-Segesta
http://ws.geonames.org/hierarchy?geonameId=6535960

And one called children to return the ADMs within another ADM. Here the regions of Italy :
http://ws.geonames.org/children?geonameId=3175395

Cheers

Marc

[WWW]
mcjennis



Joined: 06/04/2007 23:37:04
Messages: 14
Offline

great!
I found getHierarchy but didn't know about children... what about the JSON version of this methods?

cheers Fabrizio
marc



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

Hi Fabrizio

You are hard to please. Here you go :
http://ws.geonames.org/hierarchyJSON?geonameId=6535960
http://ws.geonames.org/childrenJSON?geonameId=3175395

Cheers

Marc

[WWW]
mcjennis



Joined: 06/04/2007 23:37:04
Messages: 14
Offline

Hi Marc,
my tree navigation system is almost completed, you are able to walk up and down throughout the wolrd's administration divisions.
But I am not able to predict if a specific place has children or not. Would it be possible to have a flag to understand weather a place gotten by children webservice has children or not?
So I could put a link for expansion just for places with children.

Thank you very much
Fabrizio
mcjennis



Joined: 06/04/2007 23:37:04
Messages: 14
Offline

Hi,
I really need some help to complete my project.
To determine weather a place has children or not is vital for my goal. May anyone give me some advice?
I use getchildren web service to obtain a list of places, but I don't know if they are father.

Thank you
marc



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

You are absolutely right. I didn't forget your posting. The number of children for the features returned by this service is required. I will see how fast I can implement it.

Cheers

Marc

[WWW]
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team