public void visit(RasterSymbolizer rs) { if (symbolizerGeometriesVisitEnabled) { if (rs.getGeometry() != null) { rs.getGeometry().accept(this, null); } } if (rs.getImageOutline() != null) { rs.getImageOutline().accept(this); } if (rs.getOpacity() != null) { rs.getOpacity().accept(this, null); } }
public void visit(RasterSymbolizer raster) { RasterSymbolizer copy = sf.createRasterSymbolizer(); copy.setChannelSelection(copy(raster.getChannelSelection())); copy.setColorMap(copy(raster.getColorMap())); copy.setContrastEnhancement(copy(raster.getContrastEnhancement())); copy.setGeometry(copy(raster.getGeometry())); copy.setUnitOfMeasure(raster.getUnitOfMeasure()); copy.setImageOutline(copy(raster.getImageOutline())); copy.setOpacity(copy(raster.getOpacity())); copy.setOverlapBehavior(raster.getOverlapBehavior()); copy.setShadedRelief(copy(raster.getShadedRelief())); if (STRICT && !copy.equals(raster)) { throw new IllegalStateException("Was unable to duplicate provided raster:" + raster); } pages.push(copy); }
public void testRasterSymbolizerDuplicationWithGeometryFunction() { // create a default RasterSymbolizer RasterSymbolizer original = sb.createRasterSymbolizer(); // Set a function as geometry Function geomFunc = ff.function("centroid", ff.property("thr_geom")); original.setGeometry(geomFunc); // duplicate it original.accept(visitor); RasterSymbolizer copy = (RasterSymbolizer) visitor.getCopy(); // compare it assertEquals( "Any Expression set as Geometry must be correctly replicated", geomFunc, copy.getGeometry()); }
encodeGeometryExpression(raster.getGeometry());
public void visit(RasterSymbolizer rs) { if (rs.getGeometry() != null) { rs.getGeometry().accept(this, null); } if (rs.getImageOutline() != null) { rs.getImageOutline().accept(this); } if (rs.getOpacity() != null) { rs.getOpacity().accept(this, null); } }
public void visit(RasterSymbolizer raster) { RasterSymbolizer copy = sf.createRasterSymbolizer(); copy.setChannelSelection( copy( raster.getChannelSelection() )); copy.setColorMap( copy( raster.getColorMap() )); copy.setContrastEnhancement( copy( raster.getContrastEnhancement())); copy.setGeometry(copy(raster.getGeometry())); copy.setUnitOfMeasure(raster.getUnitOfMeasure()); copy.setImageOutline( copy( raster.getImageOutline())); copy.setOpacity( copy( raster.getOpacity() )); copy.setOverlap( copy( raster.getOverlap())); copy.setShadedRelief( copy( raster.getShadedRelief())); if( STRICT && !copy.equals( raster )){ throw new IllegalStateException("Was unable to duplicate provided raster:"+raster ); } pages.push(copy); }
public void visit(RasterSymbolizer raster) { // CHECKSTYLE:ON RasterSymbolizer copy = sf.createRasterSymbolizer(); copy.setChannelSelection(copy(raster.getChannelSelection())); copy.setColorMap(copy(raster.getColorMap())); copy.setContrastEnhancement(copy(raster.getContrastEnhancement())); copy.setGeometry(copy(raster.getGeometry())); copy.setUnitOfMeasure(raster.getUnitOfMeasure()); copy.setImageOutline(copy(raster.getImageOutline())); copy.setOpacity(copy(raster.getOpacity())); copy.setOverlap(copy(raster.getOverlap())); copy.setShadedRelief(copy(raster.getShadedRelief())); if (STRICT && !copy.equals(raster)) { throw new IllegalStateException("Was unable to duplicate provided raster:" + raster); } pages.push(copy); } }
raster.getDescription().accept(this); if (raster.getGeometry() != null) {
encodeGeometryExpression(raster.getGeometry());