If your geospatial data appears flipped or rotated you may be experiencing axis ordering issues.

Axis order issues
Specifying the axis order
Source coordinate systems of LDS datasets

Axis order issues

A change in the way Spatial Reference Systems are specified took place between Web Feature Services (WFS) version 1.0.0 and version 1.1.0 that has caused headaches for some users of web services, especially those using older versions of GIS applications.

If your geographic features are not located where you expected or are rotated 90 degrees then your GIS application is likely to be incorrectly reading the coordinate axis order of the data.

See Figure 1 below for an example of what this issue may look like.

Geodetic Marks Inverted Axis image

Figure 1: Example of a coordinate axis order reversal when using WFS 1.1.0: ArcGIS 10.0 connected to the NZ Government GNSS CORS layer. This layer has a source NZ geographic lat/long coordinate system (NZGD2000).

At versions WMS 1.3 and WFS 1.1 the coordinate system axis order was changed to be based on the coordinate system definitions in the EPSG geodetic parameter database, rather than the default Easting-Northing (x, y) order. 

Most software packages have now accounted for this change. If you are using an older version of a GIS application, it may read the axis order incorrectly and flip geographic features.

Specifying the axis order

If you are using an older version of a GIS software package and cannot upgrade, we recommend that you set your WFS version to 1.0.0. This can be done by adding the ‘VERSION’ parameter to your request:

http://data.linz.govt.nz/services;key=YOUR_API_KEY/wfs/layer-LAYER_ID?service=WFS&VERSION=1.0.0

If you require the functionality of WFS 1.1.0 or 2.0 (such as coordinate transformations) and you are having coordinate axis order issues then you can set the axis order explicitly in your request.

Here's an example using Topo500 tracks (NZTM2000) that demonstrates how to deal with the axis order issue for Northing-Easting systems using WFS 2.0:

1. Default (y/x axis order)

By default, your request will return the Northing/Easting (y, x) order for projected coordinate systems such as NZTM2000:

https://data.linz.govt.nz/services;key=YOUR_API_KEY/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=layer-231&count=3

2. Explicitly set (y/x axis order)

This is achieved by setting the SRSNAME parameter to "urn:x-ogc:def:crs:EPSG:xxxx" to control the output of the spatial reference system:

https://data.linz.govt.nz/services;key=YOUR_API_KEY/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=layer-231&count=3&SRSNAME=urn:x-ogc:def:crs:EPSG:2193

3. Explicitly set (x/y axis order)

This is achieved by setting the SRSNAME parameter to "EPSG:xxxx":

https://data.linz.govt.nz/services;key=YOUR_API_KEY/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=layer-231&count=3&SRSNAME=EPSG:2193

The axis order reversal also affects WMS between versions 1.1.1 and 1.3.0. If you are having difficulties with your WMS client software follow the same conventions as above to work around the issue.

Check out the following resources for more information on this issue:

Source coordinate systems of LDS datasets

This table shows the published coordinate system for LDS datasets and default axis order as interpreted by OGC web services.

Source dataset coordinate systemDatasetsCRS typeEPSG codeEPSG axis orderWFS 1.0.0 defaultWFS 1.1.0 defaultWFS 1.1.0/2.0.0 client issues
WGS84HydrographicGeographic4326Lat/Long (y, x)Long/Lat (x, y)Lat/Long (y, x)Y
NZGD2000Property & ownership, Electoral Street Addressing & GeodecticGeographic4167Lat/Long (y, x)Long/Lat (x, y)Lat/Long (y, x)Y
NZTM2000Topographic Mainland

Cartesian/
Projected

2193NE (y, x)NE (x, y)EN (y, x)N1

Table 1: Coordinate Reference System support and axis order differences between WFS versions 1.0.0 and 1.1.0/2.0.0.

Notes:

1. This treatment also applies to all Topographic layers in LDS which have their own Transverse Mercator projection, such as the New Zealand Offshore Island Projections.

Reference Category: Web services
Reference Tags: Axis order error, X/y, Y/x, Web feature services
Last Updated: 
29 June 2015