@Override public void visit(RasterSymbolizer sym) { this.defaultUnit = sym.getUnitOfMeasure(); try { super.visit(sym); } finally { this.defaultUnit = null; } }
public void testRasterSymbolizerWithUOM() throws Exception { RasterSymbolizer rasterSymb = sf.createRasterSymbolizer(); rasterSymb.setUnitOfMeasure(UomOgcMapping.FOOT.getUnit()); rasterSymb.accept(visitor); RasterSymbolizer clone = (RasterSymbolizer) visitor.getCopy(); assertEquals(clone.getUnitOfMeasure(), rasterSymb.getUnitOfMeasure()); RasterSymbolizer notEq = sf.createRasterSymbolizer(); assertFalse(Utilities.equals(notEq.getUnitOfMeasure(), rasterSymb.getUnitOfMeasure())); }
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); }
Unit<Length> uom = raster.getUnitOfMeasure(); if (uom != null) atts.addAttribute("", "uom", "uom", "", UomOgcMapping.get(uom).getSEString());
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); } }
Unit<Length> uom = raster.getUnitOfMeasure(); if(uom != null) atts.addAttribute("", "uom", "uom", "", UomOgcMapping.get(uom).getSEString());