Search in sources :

Example 6 with ShadedRelief

use of org.opengis.style.ShadedRelief in project geotoolkit by Geomatys.

the class SE100toGTTransformer method visit.

/**
 * Transform a SLD v1.0 raster symbolizer in GT raster symbolizer.
 */
public RasterSymbolizer visit(final org.geotoolkit.sld.xml.v100.RasterSymbolizer rst) {
    if (rst == null)
        return null;
    final Expression opacity = (rst.getOpacity() == null) ? filterFactory.literal(1) : visitExpression(rst.getOpacity());
    final ChannelSelection selection = visit(rst.getChannelSelection());
    final OverlapBehavior overlap = visitOverLap(rst.getOverlapBehavior());
    final ColorMap colorMap = visit(rst.getColorMap());
    final ContrastEnhancement enchance = visit(rst.getContrastEnhancement());
    final ShadedRelief relief = visit(rst.getShadedRelief());
    final Symbolizer outline = visit(rst.getImageOutline());
    final Unit uom = Units.POINT;
    final String geom = visitGeom(rst.getGeometry());
    final String name = "";
    final Description desc = StyleConstants.DEFAULT_DESCRIPTION;
    return styleFactory.rasterSymbolizer(name, geom, desc, uom, opacity, selection, overlap, colorMap, enchance, relief, outline);
}
Also used : ContrastEnhancement(org.opengis.style.ContrastEnhancement) Description(org.opengis.style.Description) Expression(org.opengis.filter.Expression) ChannelSelection(org.opengis.style.ChannelSelection) ColorMap(org.opengis.style.ColorMap) SimpleInternationalString(org.apache.sis.util.SimpleInternationalString) InternationalString(org.opengis.util.InternationalString) Unit(javax.measure.Unit) ShadedRelief(org.opengis.style.ShadedRelief) PointSymbolizer(org.opengis.style.PointSymbolizer) PolygonSymbolizer(org.opengis.style.PolygonSymbolizer) LineSymbolizer(org.opengis.style.LineSymbolizer) RasterSymbolizer(org.opengis.style.RasterSymbolizer) TextSymbolizer(org.opengis.style.TextSymbolizer) Symbolizer(org.opengis.style.Symbolizer) OverlapBehavior(org.opengis.style.OverlapBehavior)

Example 7 with ShadedRelief

use of org.opengis.style.ShadedRelief in project geotoolkit by Geomatys.

the class SE110toGTTransformer method visit.

/**
 * Transform a SLD v1.1 raster symbolizer in GT raster symbolizer.
 */
public RasterSymbolizer visit(final RasterSymbolizerType rst) {
    if (rst == null)
        return null;
    final Expression opacity = (rst.getOpacity() == null) ? filterFactory.literal(1) : visitExpression(rst.getOpacity());
    final ChannelSelection selection = visit(rst.getChannelSelection());
    final OverlapBehavior overlap = visitOverLap(rst.getOverlapBehavior());
    final ColorMap colorMap = visit(rst.getColorMap());
    final ContrastEnhancement enchance = visit(rst.getContrastEnhancement());
    final ShadedRelief relief = visit(rst.getShadedRelief());
    final Symbolizer outline = visit(rst.getImageOutline());
    final Unit uom = visitUOM(rst.getUom());
    final Expression geom = notEmpty(visitExpression(rst.getGeometry()));
    final String name = rst.getName();
    final Description desc = visitDescription(rst.getDescription());
    return styleFactory.rasterSymbolizer(name, geom, desc, uom, opacity, selection, overlap, colorMap, enchance, relief, outline);
}
Also used : ContrastEnhancement(org.opengis.style.ContrastEnhancement) Description(org.opengis.style.Description) Expression(org.opengis.filter.Expression) ChannelSelection(org.opengis.style.ChannelSelection) ColorMap(org.opengis.style.ColorMap) Unit(javax.measure.Unit) ShadedRelief(org.opengis.style.ShadedRelief) PolygonSymbolizer(org.opengis.style.PolygonSymbolizer) RasterSymbolizer(org.opengis.style.RasterSymbolizer) TextSymbolizer(org.opengis.style.TextSymbolizer) PointSymbolizer(org.opengis.style.PointSymbolizer) LineSymbolizer(org.opengis.style.LineSymbolizer) Symbolizer(org.opengis.style.Symbolizer) OverlapBehavior(org.opengis.style.OverlapBehavior)

Example 8 with ShadedRelief

use of org.opengis.style.ShadedRelief in project geotoolkit by Geomatys.

the class DefaultStyleVisitor method visit.

@Override
public Object visit(final RasterSymbolizer rasterSymbolizer, Object data) {
    final ChannelSelection cs = rasterSymbolizer.getChannelSelection();
    if (cs != null) {
        data = cs.accept(this, data);
    }
    final ColorMap cm = rasterSymbolizer.getColorMap();
    if (cm != null) {
        data = cm.accept(this, data);
    }
    final ContrastEnhancement ce = rasterSymbolizer.getContrastEnhancement();
    if (ce != null) {
        data = ce.accept(this, data);
    }
    final Symbolizer sym = rasterSymbolizer.getImageOutline();
    if (sym != null) {
        data = sym.accept(this, data);
    }
    final Expression opa = rasterSymbolizer.getOpacity();
    if (opa != null) {
        visit(opa, data);
    }
    final ShadedRelief shade = rasterSymbolizer.getShadedRelief();
    if (shade != null) {
        data = shade.accept(this, data);
    }
    return data;
}
Also used : ContrastEnhancement(org.opengis.style.ContrastEnhancement) ChannelSelection(org.opengis.style.ChannelSelection) Expression(org.opengis.filter.Expression) ColorMap(org.opengis.style.ColorMap) ShadedRelief(org.opengis.style.ShadedRelief) ExtensionSymbolizer(org.opengis.style.ExtensionSymbolizer) RasterSymbolizer(org.opengis.style.RasterSymbolizer) TextSymbolizer(org.opengis.style.TextSymbolizer) PointSymbolizer(org.opengis.style.PointSymbolizer) PolygonSymbolizer(org.opengis.style.PolygonSymbolizer) LineSymbolizer(org.opengis.style.LineSymbolizer) Symbolizer(org.opengis.style.Symbolizer)

Example 9 with ShadedRelief

use of org.opengis.style.ShadedRelief in project geotoolkit by Geomatys.

the class ListingPropertyVisitor method visit.

@Override
public Object visit(final RasterSymbolizer rasterSymbolizer, Object data) {
    visitGeomName(rasterSymbolizer, data);
    final ChannelSelection cs = rasterSymbolizer.getChannelSelection();
    if (cs != null) {
        data = cs.accept(this, data);
    }
    final ColorMap cm = rasterSymbolizer.getColorMap();
    if (cm != null) {
        data = cm.accept(this, data);
    }
    final ContrastEnhancement ce = rasterSymbolizer.getContrastEnhancement();
    if (ce != null) {
        data = ce.accept(this, data);
    }
    final Symbolizer sym = rasterSymbolizer.getImageOutline();
    if (sym != null) {
        data = sym.accept(this, data);
    }
    final Expression opa = rasterSymbolizer.getOpacity();
    if (opa != null) {
        visit(opa, (Collection<String>) data);
    }
    final ShadedRelief shade = rasterSymbolizer.getShadedRelief();
    if (shade != null) {
        data = shade.accept(this, data);
    }
    return data;
}
Also used : ContrastEnhancement(org.opengis.style.ContrastEnhancement) ChannelSelection(org.opengis.style.ChannelSelection) Expression(org.opengis.filter.Expression) ColorMap(org.opengis.style.ColorMap) ShadedRelief(org.opengis.style.ShadedRelief) ExtensionSymbolizer(org.opengis.style.ExtensionSymbolizer) RasterSymbolizer(org.opengis.style.RasterSymbolizer) TextSymbolizer(org.opengis.style.TextSymbolizer) PointSymbolizer(org.opengis.style.PointSymbolizer) PolygonSymbolizer(org.opengis.style.PolygonSymbolizer) LineSymbolizer(org.opengis.style.LineSymbolizer) Symbolizer(org.opengis.style.Symbolizer)

Aggregations

Expression (org.opengis.filter.Expression)9 ChannelSelection (org.opengis.style.ChannelSelection)9 ColorMap (org.opengis.style.ColorMap)9 ContrastEnhancement (org.opengis.style.ContrastEnhancement)9 LineSymbolizer (org.opengis.style.LineSymbolizer)9 PointSymbolizer (org.opengis.style.PointSymbolizer)9 PolygonSymbolizer (org.opengis.style.PolygonSymbolizer)9 RasterSymbolizer (org.opengis.style.RasterSymbolizer)9 ShadedRelief (org.opengis.style.ShadedRelief)9 Symbolizer (org.opengis.style.Symbolizer)9 TextSymbolizer (org.opengis.style.TextSymbolizer)9 Unit (javax.measure.Unit)7 Description (org.opengis.style.Description)7 OverlapBehavior (org.opengis.style.OverlapBehavior)7 SimpleInternationalString (org.apache.sis.util.SimpleInternationalString)3 Literal (org.opengis.filter.Literal)2 ExtensionSymbolizer (org.opengis.style.ExtensionSymbolizer)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 MutableStyle (org.geotoolkit.style.MutableStyle)1