
Yahoo! GeoPlanet provides two different representations of the place and placeType resources: the short representation, and the long representation. The short representation contains only the most essential information about the resource. For place resources, this includes the WOEID, the place type, and the preferred name in the requested language. For placeType resources, this is just the place type. The long representation includes additional elements. For place resources, this includes the administrative hierarchy, locality and postal information, centroid, and bounding box. For placeType resorces, this includes the place type description.
The default representation will depend on the resource/collection that is requested.
Example 1. Short Representation of Place Resource
<?xml version="1.0" encoding="UTF-8"?>
<place yahoo:uri="http://where.yahooapis.com/v1/place/2507854" xml:lang="en">
<woeid>2507854</woeid>
<placeTypeName code="7">Town</placeTypeName>
<name>Trenton</name>
</place>
Example 2. Long Representation of Place Resource
<?xml version="1.0" encoding="UTF-8"?>
<place yahoo:uri="http://where.yahooapis.com/v1/place/2507854" xml:lang="en">
<woeid>2507854</woeid>
<placeTypeName code="7">Town</placeTypeName>
<name>Trenton</name>
<country type="Country" code="US">United States</country>
<admin1 type="State" code="NJ">New Jersey</admin1>
<admin2 type="County" code="">Mercer</admin2>
<admin3/>
<locality1>Trenton</locality1>
<locality2/>
<postal/>
<centroid>
<latitude>40.21777</latitude>
<longitude>-74.759361</longitude>
</centroid>
<boundingBox>
<southWest>
<latitude>40.183868</latitude>
<longitude>-74.819519</longitude>
</southWest>
<northEast>
<latitude>40.248291</latitude>
<longitude>-74.728798</longitude>
</northEast>
</boundingBox>
</place>
Example 3. Short Representation of PlaceType Resource
<?xml version="1.0" encoding="UTF-8"?>
<placeTypes xmlns="http://where.yahooapis.com/v1/schema.rng" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:start="0" yahoo:count="1" yahoo:total="1">
<placeType yahoo:uri="http://where.yahooapis.com/v1/placetype/35" xml:lang="en-us">
<placeTypeName code="35">Historical Town</placeTypeName>
</placeType>
</placeTypes>
Example 4. Long Representation of PlaceType Resource
<?xml version="1.0" encoding="UTF-8"?>
<placeTypes xmlns="http://where.yahooapis.com/v1/schema.rng" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:start="0" yahoo:count="1" yahoo:total="1">
<placeType yahoo:uri="http://where.yahooapis.com/v1/placetype/35" xml:lang="en-us">
<placeTypeName code="35">Historical Town</placeTypeName>
<placeTypeDescription>A historical populated settlement that is no longer known by its original name</placeTypeDescription>
</placeType>
</placeTypes>