public void testTimeFirstKVP() throws Exception { setupRasterDimension(ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); setupRasterDimension(ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); String queryString ="request=getcoverage&service=wcs&version=1.0.0&format=image/geotiff" + "&bbox=0.237,40.562,14.593,44.558&crs=EPSG:4326&width=25&height=25&time=2008-10-31T00:00:00.000Z" + "&coverage=" + getLayerId(WATTEMP); MockHttpServletResponse response = getAsServletResponse("wcs?" + queryString); checkTimeFirst(response); }
@Override protected void setUpInternal() throws Exception { super.setUpInternal(); kvpreader = (Wcs10GetCoverageRequestReader) applicationContext.getBean("wcs100GetCoverageRequestReader"); service = (WebCoverageService100) applicationContext.getBean("wcs100ServiceTarget"); configuration = new WCSConfiguration(); catalog=(Catalog)applicationContext.getBean("catalog"); xmlReader = new WcsXmlReader("GetCoverage", "1.0.0", configuration); // enable dimensions on the water temperature layer setupRasterDimension(ResourceInfo.TIME, DimensionPresentation.LIST, null); setupRasterDimension(ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addRasterLayer(MOSAIC, "raster-filter-test.zip", null, getCatalog()); testData.addRasterLayer( SPATIO_TEMPORAL, "spatio-temporal.zip", null, null, SystemTestData.class, getCatalog()); testData.addRasterLayer( new QName(MockData.WCS_URI, "category", MockData.WCS_PREFIX), "category.tiff", null, getCatalog()); // enable dimensions on the water temperature layer setupRasterDimension(WATTEMP, ResourceInfo.TIME, DimensionPresentation.LIST, null); setupRasterDimension(WATTEMP, ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); }
@Test public void testTimeRangeKVP() throws Exception { setupRasterDimension(TIMERANGES, ResourceInfo.TIME, DimensionPresentation.LIST, null); setupRasterDimension(TIMERANGES, ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); String baseUrl = "wcs?request=getcoverage&service=wcs&version=1.0.0&format=image/geotiff" + "&bbox=0.237,40.562,14.593,44.558&crs=EPSG:4326&width=25&height=25" + "&coverage=" + getLayerId(TIMERANGES); // last range MockHttpServletResponse response = getAsServletResponse( baseUrl + "&TIME=2008-11-05T00:00:00.000Z/2008-11-06T12:00:00.000Z"); assertEquals("image/tiff", response.getContentType()); checkPixelValue(response, 10, 10, 13.337999683572); // middle hole, no data --> we should get back an exception Document dom = getAsDOM(baseUrl + "&TIME=2008-11-04T12:00:00.000Z/2008-11-04T16:00:00.000Z"); // print(dom); XMLAssert.assertXpathEvaluatesTo("1", "count(//ServiceExceptionReport)", dom); // first range response = getAsServletResponse( baseUrl + "&TIME=2008-10-31T12:00:00.000Z/2008-10-31T16:00:00.000Z"); assertEquals("image/tiff", response.getContentType()); checkPixelValue(response, 10, 10, 18.2659999176394); }