Search in sources :

Example 1 with PointPlacement

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);
}
Also used : Fill(org.opengis.style.Fill) PointPlacement(org.opengis.style.PointPlacement) Description(org.opengis.style.Description) Expression(org.opengis.filter.Expression) SimpleInternationalString(org.apache.sis.util.SimpleInternationalString) Unit(javax.measure.Unit) Halo(org.opengis.style.Halo) Font(org.opengis.style.Font)

Example 2 with PointPlacement

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);
}
Also used : Fill(org.opengis.style.Fill) PointPlacement(org.opengis.style.PointPlacement) Description(org.opengis.style.Description) Expression(org.opengis.filter.Expression) SimpleInternationalString(org.apache.sis.util.SimpleInternationalString) Unit(javax.measure.Unit) Halo(org.opengis.style.Halo) Font(org.opengis.style.Font)

Example 3 with PointPlacement

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;
}
Also used : LinePlacement(org.opengis.style.LinePlacement) PointPlacement(org.opengis.style.PointPlacement) LabelPlacementType(org.geotoolkit.se.xml.v110.LabelPlacementType)

Example 4 with PointPlacement

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;
}
Also used : LinePlacement(org.opengis.style.LinePlacement) PointPlacement(org.opengis.style.PointPlacement)

Aggregations

PointPlacement (org.opengis.style.PointPlacement)4 Unit (javax.measure.Unit)2 SimpleInternationalString (org.apache.sis.util.SimpleInternationalString)2 Expression (org.opengis.filter.Expression)2 Description (org.opengis.style.Description)2 Fill (org.opengis.style.Fill)2 Font (org.opengis.style.Font)2 Halo (org.opengis.style.Halo)2 LinePlacement (org.opengis.style.LinePlacement)2 LabelPlacementType (org.geotoolkit.se.xml.v110.LabelPlacementType)1