use of org.opengis.style.Graphic in project geotoolkit by Geomatys.
the class SE110toGTTransformer method visit.
/**
* Transform a SLD v1.1 point symbolizer in GT point symbolizer.
*/
public PointSymbolizer visit(final PointSymbolizerType pst) {
if (pst == null)
return null;
final Graphic graphic = (pst.getGraphic() == null) ? styleFactory.graphic() : visit(pst.getGraphic());
final Unit uom = visitUOM(pst.getUom());
final Expression geom = notEmpty(visitExpression(pst.getGeometry()));
final String name = pst.getName();
final Description desc = visitDescription(pst.getDescription());
return styleFactory.pointSymbolizer(name, geom, desc, uom, graphic);
}
use of org.opengis.style.Graphic in project geotoolkit by Geomatys.
the class GTtoSE110Transformer method visit.
/**
* Transform a GT graphicLegend in jaxb graphic legend
*/
@Override
public LegendGraphicType visit(final GraphicLegend graphicLegend, final Object data) {
final LegendGraphicType lgt = se_factory.createLegendGraphicType();
lgt.setGraphic(visit((Graphic) graphicLegend, null));
return lgt;
}
use of org.opengis.style.Graphic in project geotoolkit by Geomatys.
the class GTtoSE110Transformer method visit.
/**
* Transform a GT graphic fill in jaxb graphic fill.
*/
@Override
public GraphicFillType visit(final GraphicFill graphicFill, final Object data) {
final GraphicFillType gft = se_factory.createGraphicFillType();
gft.setGraphic(visit((Graphic) graphicFill, null));
return gft;
}
use of org.opengis.style.Graphic in project geotoolkit by Geomatys.
the class GTtoSE110Transformer method visit.
/**
* Transform a GT graphic stroke in jaxb graphic stroke.
*/
@Override
public GraphicStrokeType visit(final GraphicStroke graphicStroke, final Object data) {
final GraphicStrokeType gst = se_factory.createGraphicStrokeType();
gst.setGraphic(visit((Graphic) graphicStroke, null));
gst.setGap(visitExpression(graphicStroke.getGap()));
gst.setInitialGap(visitExpression(graphicStroke.getInitialGap()));
return gst;
}
use of org.opengis.style.Graphic in project geotoolkit by Geomatys.
the class Tester method createPointSymbolizer.
private static PointSymbolizer createPointSymbolizer() {
String name = "Point symbolizer name";
Description desc = STYLE_FACTORY.description("Point symbolizer title", "Point symbolizer description");
Unit uom = Units.POINT;
String geom = "geom";
List<GraphicalSymbol> symbols = new ArrayList<GraphicalSymbol>();
symbols.add(STYLE_FACTORY.mark());
Expression opacity = FILTER_FACTORY.literal(0.7);
Expression size = FILTER_FACTORY.literal(32);
Expression rotation = FILTER_FACTORY.literal(110);
AnchorPoint anchor = STYLE_FACTORY.anchorPoint(23, 12);
Displacement disp = STYLE_FACTORY.displacement(21, 15);
Graphic graphic = STYLE_FACTORY.graphic(symbols, opacity, size, rotation, anchor, disp);
return STYLE_FACTORY.pointSymbolizer(name, geom, desc, uom, graphic);
}
Aggregations