if (gridCRS != null) { String gridBaseCrs = gridCRS.getGridBaseCRS(); if (gridBaseCrs != null) { crs = CRS.decode(gridCRS.getGridBaseCRS()); } catch (Exception e) { throw new WcsException("Could not understand crs " + gridCRS.getGridBaseCRS(), WcsExceptionCode.InvalidParameterValue, "GridBaseCRS");
if (gridCRS != null) { String gridBaseCrs = gridCRS.getGridBaseCRS(); if (gridBaseCrs != null) { crs = CRS.decode(gridCRS.getGridBaseCRS()); } catch (Exception e) { throw new WcsException( "Could not understand crs " + gridCRS.getGridBaseCRS(), WcsExceptionCode.InvalidParameterValue, "GridBaseCRS");
@Test public void testBasic() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("identifier", layerId); raw.put("format", "image/tiff"); raw.put("BoundingBox", "-45,146,-42,147"); raw.put("store", "false"); raw.put("GridBaseCRS", "urn:ogc:def:crs:EPSG:6.6:4326"); GetCoverageType getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw); assertEquals(layerId, getCoverage.getIdentifier().getValue()); assertEquals("image/tiff", getCoverage.getOutput().getFormat()); assertFalse(getCoverage.getOutput().isStore()); assertEquals( "urn:ogc:def:crs:EPSG:6.6:4326", getCoverage.getOutput().getGridCRS().getGridBaseCRS()); }
targetCRS = reader.getOriginalEnvelope().getCoordinateReferenceSystem(); else targetCRS = CRS.decode(gridCRS.getGridBaseCRS());
targetCRS = reader.getOriginalEnvelope().getCoordinateReferenceSystem(); } else { targetCRS = CRS.decode(gridCRS.getGridBaseCRS());
assertEquals("urn:ogc:def:crs:EPSG:6.6:4326", gridCRS.getGridBaseCRS()); assertEquals("urn:ogc:def:method:WCS:1.1:2dSimpleGrid", gridCRS.getGridType()); assertEquals("urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS", gridCRS.getGridCS());