@Override public String getAttachmentFileName(Object value, Operation operation) { if (!(operation.getParameters()[0] instanceof GetCoverageType)) throw new WcsException( "Cannot handle object of type: " + operation.getParameters()[0].getClass()); GetCoverageType getCoverage = (GetCoverageType) operation.getParameters()[0]; String outputFormat = getCoverage.getOutput().getFormat().getValue(); CoverageResponseDelegate delegate = getResponseDelegate(outputFormat); return getCoverage.getSourceCoverage() + "." + delegate.getFileExtension(outputFormat); }
if (getCoverage.getSourceCoverage() == null) { if (kvp.get("coverage") == null) throw new WcsException( getCoverage.setRangeSubset(parseRangeSubset(kvp, getCoverage.getSourceCoverage()));
@Override protected void qualifyRequest( WorkspaceInfo ws, PublishedInfo l, Operation operation, Request request) { GetCapabilitiesType caps = parameter(operation, GetCapabilitiesType.class); if (caps != null) { return; } DescribeCoverageType dcov = parameter(operation, DescribeCoverageType.class); if (dcov != null) { qualifyLayerNames(dcov.getCoverage(), ws); return; } GetCoverageType gcov = parameter(operation, GetCoverageType.class); if (gcov != null) { qualifyName(gcov.getSourceCoverage(), ws); } } }
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 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()); }
assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("nearest neighbor", getCoverage.getInterpolationMethod().toString()); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("bilinear", getCoverage.getInterpolationMethod().toString()); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("nearest neighbor", getCoverage.getInterpolationMethod().toString()); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue());
meta = catalog.getCoverageByName(request.getSourceCoverage()); if (meta == null) throw new WcsException( "Cannot find sourceCoverage " + request.getSourceCoverage() + " in the catalog!");
assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("nearest neighbor", getCoverage.getInterpolationMethod().toString()); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("bilinear", getCoverage.getInterpolationMethod().toString()); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("nearest neighbor", getCoverage.getInterpolationMethod().toString()); assertEquals(layerId, getCoverage.getSourceCoverage()); assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue()); assertEquals("bicubic", getCoverage.getInterpolationMethod().toString());
assertEquals("WCS", gc.getService()); assertEquals("1.0.0", gc.getVersion()); assertEquals("nurc:Pk50095", gc.getSourceCoverage());
assertEquals("WCS", gc.getService()); assertEquals("1.0.0", gc.getVersion()); assertEquals("nurc:Pk50095", gc.getSourceCoverage());