How to prepare the test case:
Download 4 ortophotos:
http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422A.jp2
http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422B.jp2
http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422C.jp2
http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422D.jp2
Convert JPEG2000 files into GeoTIFFs
gdal_translate -of GTiff -co tiled=yes L4422A.jp2 L4422A.tif
gdal_translate -of GTiff -co tiled=yes L4422B.jp2 L4422B.tif
gdal_translate -of GTiff -co tiled=yes L4422C.jp2 L4422C.tif
gdal_translate -of GTiff -co tiled=yes L4422D.jp2 L4422D.tif
Create store and publish the layer:
Test with WMS GetMap requests by incrementally growing BBOXes
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.1&request=getmap&layers=topp:orto&BBOX=404000,6750000,406000,6752000&format=image/png&styles=&width=500&height=500&SRS=EPSG:3067
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.1&request=getmap&layers=topp:orto&BBOX=404000,6750000,411000,6757000&format=image/png&styles=&width=500&height=500&SRS=EPSG:3067
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.1&request=getmap&layers=topp:orto&&BBOX=404000,6750000,413000,6759000&format=image/png&styles=&width=500&height=500&SRS=EPSG:3067
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.1&request=getmap&layers=topp:orto&BBOX=404000,6750000,416000,6762000&format=image/png&styles=&width=500&height=500&SRS=EPSG:3067
Results with WMS are good. Next make requests from the same areas with WCS
http://localhost:8080/geoserver/wcs?service=WCS&version=2.0.1&request=getcoverage&coverageid=topp__orto&SUBSET=E(404000,406000)&SUBSET=N(6750000,6752000
http://localhost:8080/geoserver/wcs?service=WCS&version=2.0.1&request=getcoverage&coverageid=topp__orto&SUBSET=E(404000,411000)&SUBSET=N(6750000,6757000
http://localhost:8080/geoserver/wcs?service=WCS&version=2.0.1&request=getcoverage&coverageid=topp__orto&SUBSET=E(404000,413000)&SUBSET=N(6750000,6759000
http://localhost:8080/geoserver/wcs?service=WCS&version=2.0.1&request=getcoverage&coverageid=topp__orto&SUBSET=E(404000,416000)&SUBSET=N(6750000,6762000
Result:
Only the first GetCoverage request with the smallest subsetting area gives a complete GeoTIFF. The second and third requests yield a truncated GeoTIFF which are mostly black. The last request which covers the whole area with 24000x24000 pixels gives an error (attached as “GetCoverage_error.txt”). A screenshot about the truncated output from the third GetCoverage request also attached as “truncated_GetCoverage_output.png”
Geoserver does not throw any errors when it creates the truncated output. All that gets collected into the log is this:
Request: getCoverage
extension:
service = WCS
version = 2.0.1
baseUrl = http://localhost:8080/geoserver/
coverageId = topp__orto
dimensionSubsetGroup[0] = wcs:dimensionSubset=net.opengis.wcs20.impl.Dimensi
onTrimTypeImpl@anonymised.com (dimension: E, cRS: null) (trimLow: 404000, trimHigh: 4130
00)dimensionSubsetGroup[0] = wcs:dimensionSubset=net.opengis.wcs20.impl.Dimensio
nTrimTypeImpl@anonymised.com (dimension: N, cRS: null) (trimLow: 6750000, trimHigh: 6759
000)
dimensionSubset[0]:
dimension = E
trimLow = 404000
trimHigh = 413000dimensionSubset[0]:
dimension = N
trimLow = 6750000
trimHigh = 6759000
|