Ticket #3582 (closed defect: fixed)
Axis order in WMS 1.3.0
|Reported by:||elzouavo||Owned by:||mapserverbugs|
|Severity:||normal||Keywords:||axis order, epsg, axis orientation, mapaxisorder|
WMS 1.3.0 standard says "Coordinates shall be listed in the order defined by the CRS and shall be mapped appropriately...". MapServer 5.6.5 hard codes that EPSG codes between 4000 and 5000 all have axes with an inverted order.
Currently, I have to update my data servers to add the EPSG codes for French overseas territories (with GRS80). In addition I have to add the codes for the INSPIRE directive (for France metropolitan).
It turns out that EPSG codes:4559 (French Antilles) and EPSG:4471 (Mayotte) are in the range 4000-5000 but have not reversed axes order in the EPSG database (which is correct). So, customers who question my WMS servers must make wrong requests to have a right result!
With EPSG codes recommended by the European INSPIRE directive, only the EPSG:4258 is properly handled by MapServer 5.6.5 (range 4000-5000). All other concerning France (EPSG:3042, EPSG:3043 and EPSG:3044) and Pan-Europe EPSG:3034 and EPSG:3035, by definition, have reverse axes order. However, they are not in the range 4000-5000, MapServer takes as coordinate systems with "normal" axes order (longitude, latitude). Again, customers who request my WMS servers must do (if possible ...) false queries for correct answers!
I realize that WMS 1.3.0 standard (and WFS 1.1.0) brings news in coordinate systems which are not easy to integrate. OpenLayers? 2.10 has added parameter yx for "layers" (which allows great flexibility).
I'm not a developer so I have no advice to give. But would not it be interesting to add a parameter in the configuration of MapServer to point to a list of codes that must be considered with inverse axes order. Example: CONFIG "CRS_YX" "C:/somedir/crs_yx.txt"