dim.setRange(NumberRange.create(sdMin, sdMax));
cd.setName((String) map.get("name")); cd.setDescription((String) map.get("description")); cd.setRange(NumberRange.create((Double) map.get("min"), (Double) map.get("max"))); coverage.getDimensions().add(cd);
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); Catalog catalog = getCatalog(); Map<String, String> namespaces = new HashMap<String, String>(); namespaces.put("html", "http://www.w3.org/1999/xhtml"); namespaces.put("sld", "http://www.opengis.net/sld"); namespaces.put("ogc", "http://www.opengis.net/ogc"); namespaces.put("atom", "http://www.w3.org/2005/Atom"); XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces)); xp = XMLUnit.newXpathEngine(); testData.addStyle( "style_rgb", "test-data/style_rgb.sld", DynamicColorMapTest.class, catalog); Map<LayerProperty, Object> properties = new HashMap<>(); properties.put(LayerProperty.STYLE, "style_rgb"); testData.addRasterLayer( new QName(MockData.DEFAULT_URI, "watertemp_dynamic", MockData.DEFAULT_PREFIX), "test-data/watertemp_dynamic.zip", null, properties, DynamicColorMapTest.class, catalog); // setup manual statistics CoverageInfo coverage = getCatalog().getCoverageByName("watertemp_dynamic"); CoverageDimensionInfo di = coverage.getDimensions().get(0); di.setRange(new NumberRange<Double>(Double.class, 0., 0.5)); getCatalog().save(coverage); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { testData.addRasterLayer( RAIN, "rain.tif", ".tif", null, NcwmsIntegrationTest.class, getCatalog()); testData.addStyle( getCatalog().getDefaultWorkspace(), GRAY_BLUE_STYLE, "grayToBlue.palette", NcwmsIntegrationTest.class, getCatalog(), Collections.singletonMap(StyleProperty.FORMAT, PaletteStyleHandler.FORMAT)); CoverageInfo ci = getCatalog().getCoverageByName(getLayerId(RAIN)); ci.getDimensions().get(0).setRange(NumberRange.create(0d, 7000d)); getCatalog().save(ci); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addRasterLayer(SF_RAIN, "rain.zip", "asc", getCatalog()); testData.addRasterLayer(GS_RAIN, "rain.zip", "asc", getCatalog()); testData.addRasterLayer( NO_RANGE, "norange.tiff", null, null, DescribeCoverageTest.class, getCatalog()); // the GUI builds the dimension without range, let's do the same here CoverageInfo noRange = getCatalog().getCoverageByName(getLayerId(NO_RANGE)); CoverageDimensionInfo cdi = noRange.getDimensions().get(0); cdi.setRange(null); getCatalog().save(noRange); GeoServerInfo global = getGeoServer().getGlobal(); global.getSettings().setProxyBaseUrl("src/test/resources/geoserver"); getGeoServer().save(global); }
dimensionInfo.setDescription("GridSampleDimension[-100.0,1000.0]"); dimensionInfo.setUnit("m"); dimensionInfo.setRange(NumberRange.create(-100, 1000)); dimensionInfo.setName("Band" + (i++));