public SourceCoverageKvpParser(Catalog catalog) { super("sourcecoverage", String.class); setService("wcs"); this.catalog = catalog; }
public CoverageKvpParser(Catalog catalog) { super("coverage", Collection.class); setService("wcs"); this.catalog = catalog; }
public AxisSubsetKvpParser() { super("band", AxisSubsetType.class); setService("wcs"); }
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()); } }
/** Constrcutor for use with a specific wcs 1.0.0 request. */ public WcsKvpParser(String key, Class<?> binding, String request) { super(key, binding); setService("wcs"); setVersion(new Version("1.0.0")); setRequest(request); } }
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // make sure we get the right accepts versions param -> workaround for GEOS-1719 if (rawKvp.containsKey("acceptVersions")) { AcceptVersionsKvpParser avp = new AcceptVersionsKvpParser(); AcceptVersionsType avt = (AcceptVersionsType) avp.parse((String) rawKvp.get("acceptVersions")); kvp.put("acceptVersions", avt); } // make sure we get the right Sections-Type param -> workaround for GEOS-6807 if (rawKvp.containsKey("sections")) { SectionsKvpParser parser = new SectionsKvpParser(); String value = (String) rawKvp.get("sections"); EObject sections = (EObject) parser.parse(value); kvp.put("sections", sections); } request = super.read(request, kvp, rawKvp); return request; } }
/** Constrcutor for use with a specific wcs 1.0.0 request. */ public Wcs10KvpParser(String key, Class<?> binding, String request) { super(key, binding); setService("wcs"); setVersion(new Version("1.0.0")); setRequest(request); } }
@Before public void setUp() { reader = new Wcs10GetCoverageRequestReader(getCatalog()); }
public AcceptVersionsKvpParser() { super(AcceptVersionsType.class); setService("wcs"); setVersion(new Version("1.1.1")); }
@Test public void test1DRange() throws Exception { executeFailingBBoxTest("10", "This bbox was invalid?"); executeFailingBBoxTest("10,20", "This bbox was invalid?"); executeFailingBBoxTest("10,20,30", "This bbox was invalid?"); }
/** Tests Bicubic (also called cubic) interpolation with a RangeSubset. */ @Test public void testInterpolationBicubic() throws Exception { this.testRangeSubset("cubic"); }
public SectionKvpParser() { super("section", CapabilitiesSectionType.class); setService("WCS"); }
/** * This is a READ ONLY TEST so we can use one time setup */ public static Test suite() { return new OneTimeTestSetup(new GetCoverageReaderTest()); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); Catalog catalog = (Catalog) applicationContext.getBean("catalog"); reader = new GetCoverageRequestReader(catalog); }
/** * Constrcutor for use with a specific wcs 1.1 request. */ public WcsKvpParser(String key, Class binding, String request ) { super(key, binding); setService( "wcs" ); setVersion( new Version( "1.1.1" ) ); setRequest( request ); }
@Test public void testNonNumericalRange() throws Exception { executeFailingBBoxTest("10,20,a,b", "This bbox was invalid?"); executeFailingBBoxTest("a,20,30,b", "This bbox was invalid?"); }
/** Tests Bilinear (also called linear) interpolation with a RangeSubset. */ @Test public void testInterpolationBilinear() throws Exception { this.testRangeSubset("linear"); }
@Test public void testOutOfDimRange() throws Exception { executeFailingBBoxTest( "10,20,30,40,50,60,EPSG:4326", "This bbox has more dimensions than the crs?"); executeFailingBBoxTest( "10,20,30,40,EPSG:4979", "This bbox has less dimensions than the crs?"); }
/** Tests Nearest neighbor (also called nearest) interpolation with a RangeSubset. */ @Test public void testInterpolationNearest() throws Exception { this.testRangeSubset("nearest"); }
@Test public void testUnknownCRS() throws Exception { executeFailingBBoxTest( "10,20,30,40,50,60,EPSG:MakeNoPrisoners!", "This crs should definitely be unknown..."); }