I'm having trouble with inverted axis coordinates with projected New Zealand Coordinate Systems that define their axis order as North, East (y, x) in the EPSG database.
I've read in http://trac.osgeo.org/gdal/wiki/rfc20_srs_axes that GDAL/OGR set axis values for projected coordinate systems, but that doesn't seem to be the case. Using gdalsrsinfo for EPSG:2193 you can see the axis order is correctly set as North/East in the GDAL database: PROJ.4 : '+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ' OGC WKT : PROJCS["NZGD2000 / New Zealand Transverse Mercator 2000", GEOGCS["NZGD2000", DATUM["New_Zealand_Geodetic_Datum_2000", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6167"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4167"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",173], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",1600000], PARAMETER["false_northing",10000000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Northing",NORTH], AXIS["Easting",EAST], AUTHORITY["EPSG","2193"]] NZTM2000 / EPSG:2193 However when I use WFS against a geoserver instance (which respects the EPSG axis order) on a EPSG:2193 feature type the coordinate data is inverted. e.g: ogrinfo -al wfs:"http://wfs.data.linz.govt.nz/84f646e35be34843abd9cee6085b50d6/v/x231/wfs?VERSION=1.1.0&MAXFEATURES=1": INFO: Open of `wfs:http://wfs.data.linz.govt.nz/3b7124f23806431c8371f139ec84c40e/v/x231/wfs?VERSION=1.1.0&MAXFEATURES=1' using driver `WFS' successful. Layer name: v:x231 Geometry: Line String Feature Count: 1 Extent: (5751904.957475, 1845470.695523) - (5751944.729380, 1846001.917550) Layer SRS WKT: PROJCS["NZGD2000 / New Zealand Transverse Mercator 2000", GEOGCS["NZGD2000", DATUM["New_Zealand_Geodetic_Datum_2000", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6167"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AXIS["Latitude",NORTH], AXIS["Longitude",EAST], AUTHORITY["EPSG","4167"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",173], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",1600000], PARAMETER["false_northing",10000000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Northing",NORTH], AXIS["Easting",EAST], AUTHORITY["EPSG","2193"]] Geometry Column = GEOMETRY gml_id: String (0.0) name: String (0.0) status: String (0.0) track_type: String (0.0) track_use: String (0.0) OGRFeature(v:x231):7078 gml_id (String) = x231.fid-7803daab_13d2d6742b0_-7078 name (String) = (null) status (String) = (null) track_type (String) = (null) track_use (String) = vehicle LINESTRING (5751904.957475 1845470.695523,5751944.7293799994513 1846001.9175499998964) Funny thing is ogrinfo reports the SRS with the correct axis order. Of course I can add "SRSNAME=EPSG:2193" to the URL, but I'd rather the GDAL internals were working correctly. Thanks Jeremy This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or [email protected]) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You. _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
