Hello,
I have two questions.
(1)
Per the guideline (http://developer.yahoo.com/geo/geoplanet/guide/concepts.html#placetypes), it looks like place types should be Country, Admin, Admin2,....
But, in placeType column of geoplanet_places_7.5.1.tsv, they are Country, State, County....
I was wondering which place types correct and why there is no 'Province' in the file (i.e. for Canada).
(2)
Another thing is that I was looking for country structure definition information ( United States: Country, State, County, City (Town), Zip Code, Canada: Country, Province, City (town), Postal Code). Are they stored in any of the files?
Thank you.
(1)
GeoPlanet Data uses alphanumeric placetype codes, while GeoPlanet Web Service uses numeric placetype codes. The GeoPlanet Data plactype code "State" corresponds to GeoPlanet Web Service placetype code 8 (Admin1), "County" corresponds to code 9 (Admin2), and "LocalAdmin" corresponds to code 10 (Admin3). Canada provinces have placetype code "State" in GeoPlanet Data and placetype code 8 in GeoPlanet Web Service. GeoPlanet Web Service always includes a localized placetype name along with the placetype code for each place returned.
(2)
As you point out, equivalent administrative areas in countries often have different names. That's why GeoPlanet prefers to use generic names, such as Admin1, to describe these places. To find out what names a specific country uses, you can use the placetypes resource and the placetype filter. For example:
CODE
http://where.yahooapis.com/v1/placetypes.type(7,8,9,10,11,12)?view=long&appid=[yourappid]
will return information about the placetypes for Town, Admin1, Admin2, Admin3, Country, Postal Code. In every country, the place hierarchy in descending order is: Country, Admin1, Admin2, Admin3. Towns and Postal Codes may be inserted between any of these areas, depending on the relative size of the place. For example, New York City has New York State as a parent, and five counties as children. Some Towns will have Postal Codes as a parent (if they are share the Postal Code with other Towns), while other Towns will have Postal Codes as children (if they are divided into multiple Postal Codes).
Eddie Babcock
Yahoo! Geo Technologies