0

Missing Cities in County?

Hi All,

I'm trying to retrieve all cities/towns in a county, but I noticed that some of them are missing, is this something I'm doing wrong or is it a limitation of GeoPlanet?

Here is my scenario:

Country = Argentina,
State/Province = Rio Negro
County = General Roca

General Roca WOEID = 20071007

This should return all cities/towns with the given WOEID. But it only retrieves some of them.
CODE
http://where.yahooapis.com/v1/place/20071007/descendants.type(7)?appid=


For example: Cipolletti is part of General Roca County but it is not listed.

So I thought that maybe that city was not listed in GeoPlanet.

I went to YSQ Console and ran the following query:

CODE
select * from geo.places where text="Cipolletti"


The result is:

CODE
<results>
<place xmlns="http://where.yahooapis.com/v1/schema.rng"
xml:lang="en-US" yahoo:uri="http://where.yahooapis.com/v1/place/467187">
<woeid>467187</woeid>
<placeTypeName code="7">Town</placeTypeName>
<name>Cipolletti</name>
<country code="AR" type="Country">Argentina</country>
<admin1 code="" type="Province">Rio Negro</admin1>
[b]<admin2 code="" type="Department">General Roca</admin2>[/b]
<admin3/>
<locality1 type="Town">Cipolletti</locality1>
<locality2/>
<postal type="Postal Code">R8324</postal>
<centroid>
<latitude>-38.944130</latitude>
<longitude>-67.984047</longitude>
</centroid>
<boundingBox>
<southWest>
<latitude>-38.950600</latitude>
<longitude>-68.007492</longitude>
</southWest>
<northEast>
<latitude>-38.907581</latitude>
<longitude>-67.966507</longitude>
</northEast>
</boundingBox>
<areaRank>3</areaRank>
<popRank>9</popRank>
</place>
</results>


As you can see in the result above, the town (Cipolletti) exists in GeoPlanet and it Belongs to General Roca County but it is not listed in my results but yes in YQL query.

Can anybody help me? Am I doing something wrong? How can I fix it?

Thanks!

Nico.

P.s: sorry my english smile.gif

2 Replies
  • Nico,

    Your query for all descendants is correct, but by default it will only return the first 10 results. In the XML response received, notice it will tell you the start position and count of returned results, as well as the total available:

    CODE
    <places xmlns="http://where.yahooapis.com/v1/schema.rng" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:start="0" yahoo:count="10" yahoo:total="21">


    To get more results you can add the "count" parameter (documented here), for a query URL like this:

    CODE
    http://where.yahooapis.com/v1/place/20071007/descendants.type(7);count=50?appid=your-appid-here


    When I try the above query, I do see the city Cipolletti listed.

    Brian Cantoni
    Yahoo! Developer Network
    0
  • QUOTE (brianc @ Jul 20 2010, 09:59 PM) <{POST_SNAPBACK}>
    Nico,

    Your query for all descendants is correct, but by default it will only return the first 10 results. In the XML response received, notice it will tell you the start position and count of returned results, as well as the total available:

    CODE
    <places xmlns="http://where.yahooapis.com/v1/schema.rng" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:start="0" yahoo:count="10" yahoo:total="21">


    To get more results you can add the "count" parameter (documented here), for a query URL like this:

    CODE
    http://where.yahooapis.com/v1/place/20071007/descendants.type(7);count=50?appid=your-appid-here


    When I try the above query, I do see the city Cipolletti listed.

    Brian Cantoni
    Yahoo! Developer Network



    Hi Brian,

    It worked!

    Thanks for your help!

    Nico
    0
This forum is locked.

Recent Posts

in GeoPlanet General Discussion