Skip to content

Commit

Permalink
Merge pull request #5513 from rouault/wcs20_grid_axislabel
Browse files Browse the repository at this point in the history
WCS 2.0 RectifiedGrid: use 'lon lat' and 'x y' labels even with CRS with 'inverted axis' order
  • Loading branch information
rouault committed Nov 10, 2017
2 parents 31c25df + 3be5442 commit 3735c36
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions mapwcs20.c
Original file line number Diff line number Diff line change
Expand Up @@ -2038,17 +2038,9 @@ static void msWCSCommon20_CreateDomainSet(layerObj* layer, wcs20coverageMetadata
}

if(projection->proj != NULL && pj_is_latlong(projection->proj)) {
if (swapAxes == MS_FALSE) {
strlcpy(axisLabels, "long lat", sizeof(axisLabels));
} else {
strlcpy(axisLabels, "lat long", sizeof(axisLabels));
}
strlcpy(axisLabels, "long lat", sizeof(axisLabels));
} else {
if (swapAxes == MS_FALSE) {
strlcpy(axisLabels, "x y", sizeof(axisLabels));
} else {
strlcpy(axisLabels, "y x", sizeof(axisLabels));
}
strlcpy(axisLabels, "x y", sizeof(axisLabels));
}

xmlNewChild(psGrid, psGmlNs, BAD_CAST "axisLabels", BAD_CAST axisLabels);
Expand Down
4 changes: 2 additions & 2 deletions msautotest/wxs/expected/wcs_20_desc_bands.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<gml:high>104 60</gml:high>
</gml:GridEnvelope>
</gml:limits>
<gml:axisLabels>lat long</gml:axisLabels>
<gml:axisLabels>long lat</gml:axisLabels>
<gml:origin>
<gml:Point gml:id="grid_origin_multi" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
<gml:pos>49.874157 14.487132</gml:pos>
Expand Down Expand Up @@ -204,7 +204,7 @@
<gml:high>104 60</gml:high>
</gml:GridEnvelope>
</gml:limits>
<gml:axisLabels>lat long</gml:axisLabels>
<gml:axisLabels>long lat</gml:axisLabels>
<gml:origin>
<gml:Point gml:id="grid_origin_multi_new" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
<gml:pos>49.874157 14.487132</gml:pos>
Expand Down
Binary file modified msautotest/wxs/expected/wcs_20_getcov_bands_name.dat
Binary file not shown.
Binary file modified msautotest/wxs/expected/wcs_20_getcov_bands_name_new.dat
Binary file not shown.
Binary file modified msautotest/wxs/expected/wcs_20_getcov_reproj.dat
Binary file not shown.
Binary file modified msautotest/wxs/expected/wcs_20_post_bands_name.dat
Binary file not shown.
Binary file modified msautotest/wxs/expected/wcs_20_post_bands_name_new.dat
Binary file not shown.
Binary file modified msautotest/wxs/expected/wcs_mask_20_getcov_reproj.dat
Binary file not shown.

0 comments on commit 3735c36

Please sign in to comment.