use of org.opengis.style.PointPlacement in project geotoolkit by Geomatys.
the class Tester method createTextSymbolizer.
private static TextSymbolizer createTextSymbolizer() {
String name = "Text symbolizer name";
Description desc = STYLE_FACTORY.description("Text symbolizer title", "Text symbolizer description");
Unit uom = Units.FOOT;
String geom = "geom";
Fill fill = STYLE_FACTORY.fill(Color.ORANGE);
Halo halo = STYLE_FACTORY.halo(Color.PINK, 12);
PointPlacement placement = STYLE_FACTORY.pointPlacement();
Font font = STYLE_FACTORY.font();
Expression label = FILTER_FACTORY.literal("the feature field name");
return STYLE_FACTORY.textSymbolizer(name, geom, desc, uom, label, font, placement, halo, fill);
}
use of org.opengis.style.PointPlacement in project geotoolkit by Geomatys.
the class XMLUtilitiesTest method createTextSymbolizer.
private static TextSymbolizer createTextSymbolizer() {
String name = "Text symbolizer name";
Description desc = STYLE_FACTORY.description("Text symbolizer title", "Text symbolizer description");
Unit uom = Units.FOOT;
String geom = "geom";
Fill fill = STYLE_FACTORY.fill(Color.ORANGE);
Halo halo = STYLE_FACTORY.halo(Color.PINK, 12);
PointPlacement placement = STYLE_FACTORY.pointPlacement();
Font font = STYLE_FACTORY.font();
Expression label = FILTER_FACTORY.literal("the feature field name");
return STYLE_FACTORY.textSymbolizer(name, geom, desc, uom, label, font, placement, halo, fill);
}
use of org.opengis.style.PointPlacement in project geotoolkit by Geomatys.
the class GTtoSE110Transformer method visit.
/**
* Transform a GT label placement in jaxb label placement.
*
* @return
*/
public LabelPlacementType visit(final LabelPlacement labelPlacement, final Object data) {
final LabelPlacementType lpt = se_factory.createLabelPlacementType();
if (labelPlacement instanceof LinePlacement) {
final LinePlacement lp = (LinePlacement) labelPlacement;
lpt.setLinePlacement(visit(lp, null));
} else if (labelPlacement instanceof PointPlacement) {
final PointPlacement pp = (PointPlacement) labelPlacement;
lpt.setPointPlacement(visit(pp, null));
}
return lpt;
}
use of org.opengis.style.PointPlacement in project geotoolkit by Geomatys.
the class GTtoSE100Transformer method visit.
/**
* Transform a GT label placement in jaxb label placement.
*/
public org.geotoolkit.sld.xml.v100.LabelPlacement visit(final LabelPlacement labelPlacement, final Object data) {
final org.geotoolkit.sld.xml.v100.LabelPlacement lpt = sld_factory_v100.createLabelPlacement();
if (labelPlacement instanceof LinePlacement) {
final LinePlacement lp = (LinePlacement) labelPlacement;
lpt.setLinePlacement(visit(lp, null));
} else if (labelPlacement instanceof PointPlacement) {
final PointPlacement pp = (PointPlacement) labelPlacement;
lpt.setPointPlacement(visit(pp, null));
}
return lpt;
}
Aggregations