/** * Adds one of the default raster layers. * * <p>The <tt>name</tt> parameter must be one of: * * <ul> * <li>{@link CiteTestData#TASMANIA_BM} * <li>{@link CiteTestData#TASMANIA_DEM} * <li>{@link CiteTestData#ROTATED_CAD} * <li>{@link CiteTestData#WORLD} * </ul> */ public void addDefaultRasterLayer(QName name, Catalog catalog) throws IOException { if (name.equals(TASMANIA_DEM)) { addRasterLayer(name, "tazdem.tiff", null, catalog); } else if (name.equals(TASMANIA_BM)) { addRasterLayer(name, "tazbm.tiff", null, catalog); } else if (name.equals(ROTATED_CAD)) { addRasterLayer(name, "rotated.tiff", null, catalog); } else if (name.equals(WORLD)) { addRasterLayer(name, "world.tiff", null, catalog); } else if (name.equals(MULTIBAND)) { addRasterLayer(name, "multiband.tiff", null, catalog); } else { throw new IllegalArgumentException("Unknown default raster layer: " + name); } }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addRasterLayer(MOSAIC, "raster-filter-test.zip", null, getCatalog()); // enable dimensions on the water temperature layer setupRasterDimension(ResourceInfo.TIME, DimensionPresentation.LIST, null); setupRasterDimension(ResourceInfo.ELEVATION, DimensionPresentation.LIST, null); }
/** * Adds a raster layer to the setup. * * <p>The <tt>filename</tt> parameter defines the raster file to be loaded from the classpath. * This method assumes the scope of this class and calls through to {@link #addRasterLayer(QName, * String, String, Map, Class, Catalog)} */ public void addRasterLayer( QName qName, String filename, String extension, Map<LayerProperty, Object> props, Catalog catalog) throws IOException { addRasterLayer(qName, filename, extension, props, getClass(), catalog); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); addWcs11Coverages(testData); testData.addRasterLayer(DEM, "sfdem.tiff", TIFF, null, getClass(), getCatalog()); Map<LayerProperty, Object> props = new HashMap<SystemTestData.LayerProperty, Object>(); props.put( LayerProperty.ENVELOPE, new ReferencedEnvelope( 181985.7630, 818014.2370, 1973809.4640, 8894102.4298, CRS.decode("EPSG:26713", true))); testData.addVectorLayer(RESTRICTED, props, "restricted.properties", getClass(), getCatalog()); testData.addVectorLayer( TASMANIA_BM_ZONES, props, "tazdem_zones.properties", getClass(), getCatalog()); }
@Override protected void onSetUp(SystemTestData testData) throws Exception { super.onSetUp(testData); testData.addStyle("relative", "se_relativepath.sld", ResourcePoolTest.class, getCatalog()); StyleInfo style = getCatalog().getStyleByName("relative"); style.setSLDVersion(new Version("1.1.0")); getCatalog().save(style); File images = new File(testData.getDataDirectoryRoot(), "styles/images"); assertTrue(images.mkdir()); File image = new File("./src/test/resources/org/geoserver/catalog/rockFillSymbol.png"); assertTrue(image.exists()); FileUtils.copyFileToDirectory(image, images); rockFillSymbolFile = new File(images, image.getName()).getCanonicalFile(); testData.addRasterLayer( TIMERANGES, "timeranges.zip", null, null, SystemTestData.class, getCatalog()); }
/** * Adds a raster layer to the setup with no custom properties. * * <p>This method calls through to {@link #addRasterLayer(QName, String, String, Map, Catalog)} */ public void addRasterLayer(QName qName, String filename, String extension, Catalog catalog) throws IOException { addRasterLayer(qName, filename, extension, new HashMap(), catalog); }
/** * Adds a raster layer to the setup. * * <p>This method should be called during the pre system setup phase, for example from {@link * GeoServerSystemTestSupport#setUpTestData(SystemTestData)}. * * @see {@link #addRasterLayer(QName, String, String, Map, Class, Catalog)} */ public void setUpRasterLayer( QName qName, String filename, String extension, Map<LayerProperty, Object> props, Class scope) throws IOException { addRasterLayer(qName, filename, extension, props, scope, catalog); }
/** * Adds a raster layer to the setup with no custom properties. * * <p>This method should be called during the pre system setup phase, for example from {@link * GeoServerSystemTestSupport#setUpTestData(SystemTestData)}. * * @see {@link #addRasterLayer(QName, String, String, Catalog)} */ public void setUpRasterLayer(QName qName, String filename, String extension) throws IOException { addRasterLayer(qName, filename, extension, catalog); }
public void setUpWcs10RasterLayers() throws IOException { addRasterLayer(USA_WORLDIMG, "usa.zip", PNG, catalog); }