public void testUnsupportedCRS() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw.put("format", "image/tiff"); raw.put("CRS", "urn:ogc:def:crs:EPSG:6.6:-1000"); raw.put("width", "150"); raw.put("height", "150"); try { reader.read(reader.createRequest(), parseKvp(raw), raw); fail("We should have had a WcsException here?"); } catch (WcsException e) { assertEquals("crs", e.getLocator()); assertEquals("InvalidParameterValue", e.getCode()); } }
public void testUnknownCoverageParams() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = "fairyTales:rumpelstilskin"; raw.put("sourcecoverage", layerId); raw.put("format", "SuperCoolFormat"); raw.put("BBOX", "-45,146,-42,147"); raw.put("crs", "EPSG:4326"); try { reader.read(reader.createRequest(), parseKvp(raw), raw); fail("That coverage is not registered???"); } catch (WcsException e) { assertEquals(InvalidParameterValue.toString(), e.getCode()); assertEquals("sourcecoverage", e.getLocator()); } }
@Test public void testUnsupportedCRS() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw.put("format", "image/tiff"); raw.put("CRS", "urn:ogc:def:crs:EPSG:6.6:-1000"); raw.put("width", "150"); raw.put("height", "150"); try { reader.read(reader.createRequest(), parseKvp(raw), raw); fail("We should have had a WcsException here?"); } catch (WcsException e) { assertEquals("crs", e.getLocator()); assertEquals("InvalidParameterValue", e.getCode()); } } }
public void testBasic() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw.put("format", "image/tiff"); raw.put("BBOX", "-45,146,-42,147"); raw.put("CRS", "EPSG:4326"); raw.put("width", "150"); raw.put("height", "150"); GetCoverageType getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("EPSG:4326", getCoverage.getOutput().getCrs().getValue()); }
@Test public void testUnknownCoverageParams() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = "fairyTales:rumpelstilskin"; raw.put("sourcecoverage", layerId); raw.put("format", "SuperCoolFormat"); raw.put("BBOX", "-45,146,-42,147"); raw.put("crs", "EPSG:4326"); try { reader.read(reader.createRequest(), parseKvp(raw), raw); fail("That coverage is not registered???"); } catch (WcsException e) { assertEquals(InvalidParameterValue.toString(), e.getCode()); assertEquals("sourcecoverage", e.getLocator()); } }
@Test public void testUnknownCoverageParams() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = "fairyTales:rumpelstilskin"; raw.put("identifier", layerId); raw.put("format", "SuperCoolFormat"); raw.put("BoundingBox", "-45,146,-42,147"); try { reader.read(reader.createRequest(), parseKvp(raw), raw); fail("That coverage is not registered???"); } catch (WcsException e) { assertEquals(InvalidParameterValue.toString(), e.getCode()); assertEquals("identifier", e.getLocator()); } }
@Test public void testBasic() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw.put("format", "image/tiff"); raw.put("BBOX", "-45,146,-42,147"); raw.put("CRS", "EPSG:4326"); raw.put("width", "150"); raw.put("height", "150"); GetCoverageType getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("EPSG:4326", getCoverage.getOutput().getCrs().getValue()); }
@Test public void testUnsupportedCRS() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("identifier", layerId); raw.put("format", "image/tiff"); raw.put("GridBaseCRS", "urn:ogc:def:crs:EPSG:6.6:-1000"); try { reader.read(reader.createRequest(), parseKvp(raw), raw); fail("We should have had a WcsException here?"); } catch (WcsException e) { assertEquals("GridBaseCRS", e.getLocator()); assertEquals("InvalidParameterValue", e.getCode()); } }
public void testInterpolation() throws Exception { Map<String, Object> raw = baseMap(); String layerId = getLayerId(TASMANIA_BM); raw.put("SourceCoverage", layerId); raw = baseMap(); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw = baseMap(); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw = baseMap(); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0");
@Test public void testInterpolation() throws Exception { Map<String, Object> raw = baseMap(); String layerId = getLayerId(TASMANIA_BM); raw.put("SourceCoverage", layerId); raw = baseMap(); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw = baseMap(); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0"); raw = baseMap(); raw.put("SourceCoverage", layerId); raw.put("version", "1.0.0");
Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM);
@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()); }
@Test public void testGridOffsets() throws Exception { Map<String, Object> raw = baseMap();
@Test public void testGridOrigin() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("identifier", layerId);
public void testMissingParams() throws Exception { Map<String, Object> raw = baseMap();
@Test public void testMissingParams() throws Exception { Map<String, Object> raw = baseMap();
@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()); } }
@Test public void testGridTypes() throws Exception { Map<String, Object> raw = baseMap(); final String layerId = getLayerId(TASMANIA_BM); raw.put("identifier", layerId);
@Test public void testMissingParams() throws Exception { Map<String, Object> raw = baseMap();