use of org.geotoolkit.se.xml.v110.RasterSymbolizerType in project geotoolkit by Geomatys.
the class GTtoSE110Transformer method visit.
/**
* Transform a GT raster symbolizer in jaxb raster symbolizer.
*/
@Override
public JAXBElement<RasterSymbolizerType> visit(final RasterSymbolizer raster, final Object data) {
final RasterSymbolizerType tst = se_factory.createRasterSymbolizerType();
tst.setName(raster.getName());
tst.setDescription(visit(raster.getDescription(), null));
tst.setUom(visitUOM(raster.getUnitOfMeasure()));
tst.setGeometry(visitExpression(raster.getGeometry()));
if (raster.getChannelSelection() != null) {
tst.setChannelSelection(visit(raster.getChannelSelection(), null));
}
if (raster.getColorMap() != null) {
tst.setColorMap(visit(raster.getColorMap(), null));
}
if (raster.getContrastEnhancement() != null) {
tst.setContrastEnhancement(visit(raster.getContrastEnhancement(), null));
}
if (raster.getImageOutline() != null) {
final ImageOutlineType iot = se_factory.createImageOutlineType();
if (raster.getImageOutline() instanceof LineSymbolizer) {
final LineSymbolizer ls = (LineSymbolizer) raster.getImageOutline();
iot.setLineSymbolizer(visit(ls, null).getValue());
tst.setImageOutline(iot);
} else if (raster.getImageOutline() instanceof PolygonSymbolizer) {
final PolygonSymbolizer ps = (PolygonSymbolizer) raster.getImageOutline();
iot.setPolygonSymbolizer(visit(ps, null).getValue());
tst.setImageOutline(iot);
}
}
tst.setOpacity(visitExpression(raster.getOpacity()));
if (raster.getOverlapBehavior() != null) {
tst.setOverlapBehavior(visit(raster.getOverlapBehavior(), null));
}
if (raster.getShadedRelief() != null) {
tst.setShadedRelief(visit(raster.getShadedRelief(), null));
}
return se_factory.createRasterSymbolizer(tst);
}
Aggregations