[mapserver-dev] Get Axis order from EPSG code

Fabian Schindler fabian.schindler at eox.at
Thu Feb 16 08:08:19 EST 2012

Hi Devs,

I was wondering if there is a decent way (or function) to determine the 
axis order (xy or yx) from a given EPSG code?

My specific problem is the following:

WCS 2.0 produces CoverageDescriptions which contain a gml:boundedBy 
element which is expressed in a specific SRS identified by the ID.

The following example (as produced by MapServer) is currently wrong, as 
the axis labels ("lat long") are correct, but the bounding box values 
are not (expressed in xy instead of yx).

<gml:Envelope axisLabels="lat long" srsDimension="2" 
srsName="http://www.opengis.net/def/crs/EPSG/0/4326" uomLabels="deg deg">
<gml:lowerCorner>32.26692700 8.77892600</gml:lowerCorner>
<gml:upperCorner>46.21538200 25.09349500</gml:upperCorner>

I'd like to sort out this bug, but before I'd like to know whether or 
not a general rule exists to find out the axis order from a given EPSG code.


More information about the mapserver-dev mailing list