Hi all,
We've enabled a couple of new geo-related parameters for the
photos.search method. They are :
* "has_geo"
This is pretty much what it sounds like : Any photo that has geo
information associated with it. For example, as of this writing there
are just under 8,900 geotagged photos of "kittens".
YA RLY!!!
* "lat", "lon" and "radius" (and "radius_units")
Also known as radial queries or "show me all the photos within an (n) km
radius of a point (read: a photo). You have always been able to do
something like this using the "bbox" parameter but radial queries are
also sorted by (ascending) distance from the center point (assuming you
leave the "sort" parameter empty.)
They also save you from having to calculate a bounding box with is, you
know, boring.
Radial queries are not meant for pulling all the photos at the country
or even state level and as such the maximum allowable radius is 32
kilometers (or 20 miles). The default value is 5 and you can toggle
between metric and imperial by assigning the "radius_units" parameter a
value of "km" or "mi" (the default is "km").
Tangentially related, if you really want to get all the photos at the
country level you can simply ask for photos with that country's WOE ID.
For more detail on how to do that I direct your attention to the Y!
GeoPlanet API docs and Dan's post on how it all works with Flickr :
http://developer.yahoo.com/geo/
http://geobloggers.com/archives/2008/05/12/yahoo-woe-where-on-earth-that-is-ids/
Anwyay, like the other geo-related parameters these require some sort of
limiting agent such as a user ID or a tag or a date to prevent cascading
tears of pain, starting with the databases.
If no limiting agent is passed with the query then we will apply one for
you : only photos added in the last 12 hours. This is admittedly pretty
conservative and we may loosen those restrictions in the future but for
now you should be aware of the restriction.
You can also pass an "accuracy" parameter with either argument, if
you're in to that kind of thing.
Finally, if you're curious, the order of precendence for the various
geo-related arguments is : has_geo; a bounding box; a radial query; a
WOE ID (or Places ID).
Enjoy!