Permalink
Browse files

WCS 2.0: add comments and test that we support SIZExxx, RESOLUTIONxxx…

… and SUBSETxxx keys
  • Loading branch information...
rouault committed May 3, 2018
1 parent afba8dd commit 3fafb87488e364a62eab255f816991fda0eace97
Showing with 7 additions and 4 deletions.
  1. +3 −0 mapwcs20.c
  2. +4 −4 msautotest/wxs/wcs_simple.map
View
@@ -1673,6 +1673,7 @@ int msWCSParseRequest20(mapObj *map,
axis->size = max - min;
}
msFreeCharArray(tokens, num);
/* We explicitly don't test for strict equality as the parameter name is supposed to be unique */
} else if (EQUALN(key, "SIZE", 4)) {
/* Deprecated scaling */
wcs20AxisObjPtr axis = NULL;
@@ -1698,6 +1699,7 @@ int msWCSParseRequest20(mapObj *map,
return MS_FAILURE;
}
axis->size = size;
/* We explicitly don't test for strict equality as the parameter name is supposed to be unique */
} else if (EQUALN(key, "RESOLUTION", 10)) {
wcs20AxisObjPtr axis = NULL;
char axisName[500];
@@ -1723,6 +1725,7 @@ int msWCSParseRequest20(mapObj *map,
return MS_FAILURE;
}
axis->resolution = resolution;
/* We explicitly don't test for strict equality as the parameter name is supposed to be unique */
} else if (EQUALN(key, "SUBSET", 6)) {
wcs20AxisObjPtr axis = NULL;
wcs20SubsetObjPtr subset = msWCSCreateSubsetObj20();
@@ -160,8 +160,8 @@
#
# GetCoverage 2.0 image/tiff trim x y both
# RUN_PARMS: wcs_20_getcov_trim_x_y_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(10,20)&SUBSET=y(10,20)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# GetCoverage 2.0 image/tiff trim x y both to 1x1px image (#3857)
# RUN_PARMS: wcs_20_getcov_trim_x_y_both_1px.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(10,10)&SUBSET=y(10,10)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# GetCoverage 2.0 image/tiff trim x y both to 1x1px image (#3857). And also test that we accept suffix to SUBSET keyword as it is supposed to be unique
# RUN_PARMS: wcs_20_getcov_trim_x_y_both_1px.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSETx=x(10,10)&SUBSETy=y(10,10)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
#
# GetCoverage 2.0 gml+image/tiff full
# RUN_PARMS: wcs_20_getcov_full.dat [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&MEDIATYPE=multipart/related" > [RESULT]
@@ -182,8 +182,8 @@
# RUN_PARMS: wcs_20_getcov_scaling_size_full.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SIZE=x(10)&SIZE=y(20)" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_scaling_resolution_full.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&RESOLUTION=x(20)&RESOLUTION=y(20)" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_scaling_size_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(10,30)&SUBSET=y(10,30)&SIZE=x(40)&SIZE=y(40)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_scaling_resolution_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(10,30)&SUBSET=y(10,30)&RESOLUTION=x(5)&RESOLUTION=y(5)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_imageCRS_scaling_size_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(10, 20)&SUBSET=y(10, 20)&SIZE=x(20)&SIZE=y(30)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_scaling_resolution_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(10,30)&SUBSET=y(10,30)&RESOLUTIONx=x(5)&RESOLUTIONy=y(5)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_imageCRS_scaling_size_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(10, 20)&SUBSET=y(10, 20)&SIZEx=x(20)&SIZEy=y(30)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_imageCRS_scaling_resolution_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x(0,10)&SUBSET=y(0,10)&RESOLUTION=x(20)&RESOLUTION=y(5)&SUBSETTINGCRS=imageCRS" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_origCRS_scaling_size_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x,http://www.opengis.net/def/crs/EPSG/0/32611(0,50)&SUBSET=y,http://www.opengis.net/def/crs/EPSG/0/32611(0,50)&SIZE=x(30)&SIZE=y(35)" > [RESULT_DEMIME]
# RUN_PARMS: wcs_20_getcov_origCRS_scaling_resolution_trim_both.tif [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=grey&FORMAT=image/tiff&SUBSET=x,http://www.opengis.net/def/crs/EPSG/0/32611(0,50)&SUBSET=y,http://www.opengis.net/def/crs/EPSG/0/32611(0,50)&RESOLUTION=x(5)&RESOLUTION=y(2)" > [RESULT_DEMIME]

0 comments on commit 3fafb87

Please sign in to comment.