[mapserver-dev] Get Axis order from EPSG code

Yewondwossen Assefa assefay at gmail.com
Thu Feb 16 08:20:20 EST 2012


Hi,

  If you are referring to  Mapserver code base, there is a predefined 
list of epsg codes that have inverted axis (mapaxisorder.h). It is used 
currently in a couple of places (check mapfile.c function msIsAxisInverted).

best regards,

Y. Assefa


On 12-02-16 05:38 PM, Fabian Schindler wrote:
> 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:boundedBy>
> <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>
> </gml:Envelope>
> </gml:boundedBy>
>
> 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.
>
> Thanks,
> Fabian
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list