This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

bounding box values order: (lat,lon,lat,lon) vs. (lat,lat,lon,lon)

0

The order of the values in a bounding box does not seem to be consistent.

https://wiki.openstreetmap.org/wiki/Bounding_Box says the order is "left,bottom,right,top", or "min Longitude , min Latitude , max Longitude , max Latitude". This seems to be the order given in the box at the top in the search that is displayed when doing an HTML query at http://nominatim.openstreetmaps.org.

But the ordered returned by an XML or JSON query is "lat1, lat2, lon1, lon2".

Is the wiki wrong or incomplete? Where else are the two different orders used, and which is more canonical?

asked 16 Jan '13, 17:19

dhalbert's gravatar image

dhalbert
61338
accept rate: 0%

edited 16 Jan '13, 18:36


One Answer:

2

They usually follow the standard format of

Usually is not the same thing as always. Besides that, there is another incorrect assumption on that wiki-page: There is no rule that the units have to be in degrees.

Every tool is free to define a bounding box in a way that seems best to the maker of that tool.

answered 16 Jan '13, 19:18

cartinus's gravatar image

cartinus
7.0k1066105
accept rate: 27%

1

Sounds like I should augment the wiki entry.

(17 Jan '13, 15:18) dhalbert

Source code available on GitHub .