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 map suburb (PPLX) to City (PPL)  XML
Forum Index -> FAQ - frequently asked questions
Author Message
wavecycle



Joined: 27/05/2009 12:29:17
Messages: 1
Offline

Hi, can anybody please help? I want to create a hierarchical structure: Country-Region-City-Suburb using the GeoNames info.

If I view the entry for Rosebank, Cape Town in South Africa (id=3362024) through the webservice (http://ws.geonames.org/hierarchy?geonameId=3362024), I get presented with the hierarchical XML structure that tells me that Rosebank is in the Glen Dirk area, that is in Cape Town, etc etc. Neat.

However if I download the ZA.txt file, there does not seem to be a complete hierarchical structure, as I can see that Rosebank is in the "11" AdminCode1 field (Province of the Western Cape), but I can't see what area, or city it is in. Am I missing something?

How can I get this hierarchical information like is presented in the XML mentioned above? But complete for the whole world?

Please help!

Thank you
Justin
marc



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

Justin

The relation is not yet included in the dump. The information in the webservice was generated with reverse geocoding every pplx and finding the most appropriate ppl nearby.
A dump is available here:
http://download.geonames.org/ppl_pplx.csv.gz

Best

Marc

[WWW]
netvandal



Joined: 11/07/2009 10:47:33
Messages: 7
Offline

Hi all,
Is possibile to have the above cvs?
i'm trying to reconstruct hiearchy for geonameid 3181554, but in hierarchy dump it never appear as a child of someone else. i suppose is the same problem. right?
marc



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

The ppl-pplx hierarchy is now included in the dump directory, in the file hierarchy.txt. 3181554 cannot appear as a child because it is a PPL, it has one child (PPLX: Villaggio Ferrari).

Best

Marc

[WWW]
netvandal



Joined: 11/07/2009 10:47:33
Messages: 7
Offline

hum.. and how do you get the right "up" hierarchy here? (http://geotree.geonames.org/?id=3181554) ?
thanks a lot
geotree


[Avatar]
Joined: 23/07/2007 18:28:40
Messages: 138
Location: France
Offline

@Marc : there is something strange in hierarchy ws.

Hierarchy of Brescia (PPL) returns :
AREA > CONT > PCLI > ADM1 > ADM2 > ADM3 > PPL
http://ws.geonames.org/hierarchyJSON?formatted=true&geonameId=3181554

while hierarchy of its child Villaggio Ferrari (PPLX) returns :
AREA > CONT > PCLI > ADM1 > PPL > PPLX
ADM2 and ADM3 are missing
http://ws.geonames.org/hierarchyJSON?formatted=true&geonameId=3164234

Another strange thing : Earth is an AREA with countryName = Austria ??!

Christophe
geotree.geonames.org
geotree.geonames.org/geotree.html
[WWW]
marc



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

@netvandal: you have to use the admincodes to find the parent admin divisions of a toponym.

@geotree:

The pplx is missing the lower level admin codes. So far there is no batch job that checks for this kind of inconsistencies and fixes it. Could be worthwhile to have a look at this.

The problem with 'earth' is a recent update. I have improved the relevancy calculator to spot this kind of error with the qa tool.

Marc

[WWW]
krztfrbn



Joined: 02/05/2011 20:07:09
Messages: 2
Offline

I'm having trouble with another PPLX -> PPL mapping.

Tel Aviv (293397) is listed as a PPX (although wikipedia and other sites suggest that Tel Aviv is a city in its own right, so I expected it to be PPL, but this is probably due to my limited understanding of what PPLX really means). The hierarchy file contains the following hierarchy:

293394 -> 293397

but there doesn't seem to be an entry for parent 293394 in the allCountries.txt file.

What am I doing wrong?
marc



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

you are right Tel Aviv had the wrong feature code. It should be PPLA as it is the seat of the Tel Aviv district. I changed this.

Best

Marc

[WWW]
krztfrbn



Joined: 02/05/2011 20:07:09
Messages: 2
Offline

Awesome, thanks Marc!
SEO



Joined: 14/10/2008 18:58:20
Messages: 18
Offline

Is there a way to accurately link a PPLX to the corresponding city yet?

Best Regards,
J.
marc



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

As mentioned above the relation is in the file hierarchy.zip, though it has been automatically assigned.

Best Regards

Marc

[WWW]
gilish



Joined: 10/06/2014 17:14:38
Messages: 3
Offline

2.5 years after... related question:

When searching for Bondi, a suburb of Sydney, it's fcode is PPL.
however Sydney's fcode is PPL as well, so do other suburbs of sydney.

http://ws.geonames.org/hierarchy?geonameId=2208290&username=demo

here you can see Sydney is not part of the hierarchy of Bondi , even though Bondi is in Sydney.

How do I resolve this ?
Is this an error ? or am I using the system wrong ?
How do I distinguish a city from its suburbs ?

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