iD icon indicating copy to clipboard operation
iD copied to clipboard

Add support for CRS:84 projection

Open rbuffat opened this issue 5 years ago • 1 comments

WMS server typically support the CRS:84 projection, which is very similar to EPSG:4326. The difference is, that CRS:84 is in lon/lat axis order, while EPSG:4326 has lat/lon axis order. This is relevant for WMS 1.3.0, as with this standard the bbox coordinates should be in order as defined in the CRS, while WMS versions prior 1.3.0 require lon/lat, respectively x,y axis ordering.

In practice, it is unlikely that a server supports CRS:84 and not also EPSG:4326, but adding support for it is not a lot of work.

rbuffat avatar Oct 27 '20 19:10 rbuffat

I forgot to add some background information: See the WMS 1.3.0 specification

The relevant parts are:

6.7.3.2 CRS namespace for CRS EXAMPLE “CRS:84” refers to WGS 84 geographic longitude and latitude expressed in decimal degrees, with longitude ranging from −180 degrees to +180 degrees and latitude from −90 degrees to +90 degrees.

6.7.4 Bounding boxes Bounding box values specify the portion of the Earth to be mapped through two pairs of coordinates in a specified Layer CRS. The first pair specifies the minimum coordinate values in the Layer CRS, the second specifies maximum coordinate values. Although for most CRSs with axes incrementing to the east and north this would be the lower left and upper right corners of the area of interest, the minimum and maximum values might be at other points in some instances. For example, when using geographic coordinates to describe an area over a pole, or when the layer CRS axes increment in directions other than east and north. The order in which ordinates in each pair are listed shall be as defined by the Layer CRS; x corresponds to the first axis in the Layer CRS and y to the second. This order may not coincide with the Map CS axis order i, j. The bounding box coordinate values shall be in the units defined for the Layer CRS.

...

EXAMPLE 1 A <BoundingBox> metadata element for a Layer representing the entire Earth in the CRS:84 Layer CRS would be written as <BoundingBox CRS="CRS:84" minx="-180" miny="-90" maxx="180" maxy="90">. A BBOX parameter requesting a map of the entire Earth would be written in this CRS as BBOX=-180,-90,180,90. EXAMPLE 2 A <BoundingBox> representing the entire Earth in the EPSG:4326 Layer CRS would be written as <BoundingBox CRS="EPSG:4326" minx="-90" miny="-180" maxx="90" maxy="180">. A BBOX parameter requesting a map of the entire Earth would be written in this CRS as BBOX=-90,-180,90,180.

rbuffat avatar Oct 31 '20 09:10 rbuffat