Skip to content

Commit 3be5442

Browse files
committed
WCS 2.0 RectifiedGrid: use 'lon lat' and 'x y' labels even with CRS with 'inverted axis' order
My understanding of the thread at https://lists.osgeo.org/pipermail/gdal-dev/2017-November/047650.html is that the RectifiedGrid.axisLabels element should reflect the way the grid axis are ordered (and not the axis order of the CRS as mandated by EPSG). As our offsetVector s are ordered in the GIS friendly order, the labels should reflect that as well Note that according to Peter Baumann per https://lists.osgeo.org/pipermail/gdal-dev/2017-November/047668.html the content could be pretty much anything.
1 parent 31c25df commit 3be5442

8 files changed

+4
-12
lines changed

mapwcs20.c

+2-10
Original file line numberDiff line numberDiff line change
@@ -2038,17 +2038,9 @@ static void msWCSCommon20_CreateDomainSet(layerObj* layer, wcs20coverageMetadata
20382038
}
20392039

20402040
if(projection->proj != NULL && pj_is_latlong(projection->proj)) {
2041-
if (swapAxes == MS_FALSE) {
2042-
strlcpy(axisLabels, "long lat", sizeof(axisLabels));
2043-
} else {
2044-
strlcpy(axisLabels, "lat long", sizeof(axisLabels));
2045-
}
2041+
strlcpy(axisLabels, "long lat", sizeof(axisLabels));
20462042
} else {
2047-
if (swapAxes == MS_FALSE) {
2048-
strlcpy(axisLabels, "x y", sizeof(axisLabels));
2049-
} else {
2050-
strlcpy(axisLabels, "y x", sizeof(axisLabels));
2051-
}
2043+
strlcpy(axisLabels, "x y", sizeof(axisLabels));
20522044
}
20532045

20542046
xmlNewChild(psGrid, psGmlNs, BAD_CAST "axisLabels", BAD_CAST axisLabels);

msautotest/wxs/expected/wcs_20_desc_bands.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<gml:high>104 60</gml:high>
1717
</gml:GridEnvelope>
1818
</gml:limits>
19-
<gml:axisLabels>lat long</gml:axisLabels>
19+
<gml:axisLabels>long lat</gml:axisLabels>
2020
<gml:origin>
2121
<gml:Point gml:id="grid_origin_multi" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
2222
<gml:pos>49.874157 14.487132</gml:pos>
@@ -204,7 +204,7 @@
204204
<gml:high>104 60</gml:high>
205205
</gml:GridEnvelope>
206206
</gml:limits>
207-
<gml:axisLabels>lat long</gml:axisLabels>
207+
<gml:axisLabels>long lat</gml:axisLabels>
208208
<gml:origin>
209209
<gml:Point gml:id="grid_origin_multi_new" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
210210
<gml:pos>49.874157 14.487132</gml:pos>
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)