[Developers] query for everything that has a geocode
John Giannandrea
jg at metaweb.com
Mon Jan 28 08:23:49 UTC 2008
Eric Hanson wrote:
> Now I want to ask for the name and lat/long of all things
> that have a property that has a geocode as a value -- everything
> with a
> geocode. Is this possible?
yes, something like this will work:
{
"query" : [
{
"/type/reflect/any_master" : [
{
"latitude" : null,
"link" : {
"master_property" : null
},
"longitude" : null,
"type" : "/location/geocode"
}
],
"id" : null,
"name" : null,
"type" : []
}
]
}
There are 260K geocodes in the system, so you will have to use a
cursor to get them all.
-jg
More information about the Developers
mailing list