gridCS = gridCRS.getGridCS();
@Test public void testGridCS() 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("GridCS", GridCS.GCSGrid2dSquare.getXmlConstant()); GetCoverageType getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw); assertEquals( GridCS.GCSGrid2dSquare.getXmlConstant(), getCoverage.getOutput().getGridCRS().getGridCS()); raw.put("GridCS", GridCS.GCSGrid2dSquare.getXmlConstant().toUpperCase()); getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw); assertEquals( GridCS.GCSGrid2dSquare.getXmlConstant(), getCoverage.getOutput().getGridCRS().getGridCS()); raw.put("GridCS", "Hoolabaloola"); try { reader.read(reader.createRequest(), parseKvp(raw), raw); fail("We should have had a WcsException here?"); } catch (WcsException e) { assertEquals(InvalidParameterValue.name(), e.getCode()); assertEquals("GridCS", e.getLocator()); } }
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()); System.out.println(gridCRS.getGridOrigin().getClass() + ": " + gridCRS.getGridOrigin()); assertTrue(Arrays.equals(new Double[] {10.0, 20.0}, (Double[]) gridCRS.getGridOrigin()));
String gridCS = gridCRS.getGridCS(); if (gridCS != null) { if (!gridCS.equalsIgnoreCase(GridCS.GCSGrid2dSquare.getXmlConstant()))
String gridCS = gridCRS.getGridCS(); if (gridCS != null) { if (!gridCS.equalsIgnoreCase(GridCS.GCSGrid2dSquare.getXmlConstant()))