[OSM-talk] bounding box requests, and failures

Dave Stubbs osm.list at randomjunk.co.uk
Wed Nov 28 17:43:33 GMT 2007


On 28/11/2007, Paul Fox <pgf at foxharp.boston.ma.us> wrote:
> martijn van oosterhout wrote:
>  > On Nov 28, 2007 6:11 PM, Paul Fox <pgf at foxharp.boston.ma.us> wrote:
>  > > but i'm actually surprised that _either_ request works, since both
>  > > ask for over .35 degrees of lon/lat, which clearly exceeds the 0.25 listed
>  > > on the wiki page.
>  >
>  > The 0.25 is (IIRC) calibrated to the latitude you're at. So at the
>  > equator it's exactly 0.25 but as you get further north/south the limit
>  > is higher (otherwise very far north even very small areas would never
>  > be able to be downloaded...)
>
> that would make sense, but it's not what the wiki says:
>     "They cannot enclose more than 0.25 degrees of latitude or
>     longitude.  The area covered by the largest possible bounding
>     box (of 0.25 square degrees) varies from about 900 square
>     miles at the equator to about 400 square miles on Iceland."

The wiki is slightly wrong. The API prevents you downloading more than
0.25 *square* degrees. That's a 0.5x0.5 degree box, or a 1x0.25
rectangle etc.
You're requesting a 0.35 x 0.35 degree area, and my maths makes
0.35x0.35 = 0.1225 square degrees which is smaller than < 0.25, hence
they're allowed.

The API will also throw an error if the request would return more than
50,000 nodes.

In either instance the error message is contained within the reply
http header "Error", and is actually quite verbose. Adding "-S" to
your wget options for the 2nd request reveals: "Error: You requested
too many nodes (limit is 50,000). Either request a smaller area, or
use planet.osm".

Dave




More information about the talk mailing list