Interface LinePlacement

All Superinterfaces:
LabelPlacement
All Known Implementing Classes:
LinePlacementImpl

public interface LinePlacement extends LabelPlacement
The "LinePlacement" specifies where and how a text label should be rendered relative to a line.
Since:
GeoAPI 2.2
Author:
Open Geospatial Consortium, Johann Sorel (Geomatys), Ian Turton, CCG
  • Method Summary

    Modifier and Type
    Method
    Description
    accept(TraversingStyleVisitor visitor, Object extraData)
    calls the visit method of a StyleVisitor
    Gap gives the distance between two graphics.
    InitialGap specifies how far away the first graphic will be drawn relative to the start of the rendering line
    The PerpendicularOffset element of a LinePlacement gives the perpendicular distance away from a line to draw a label.
    boolean
    Labels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.
    boolean
    GeneralizeLine allows the actual geometry, be it a linestring or polygon to be generalized for label placement.
    boolean
    If IsRepeated is "true", the label will be repeatedly drawn along the line with InitialGap and Gap defining the spaces at the beginning and between labels.
    void
    setAligned(boolean aligned)
     
    void
     
    void
    setGeneralized(boolean generalized)
     
    void
     
    void
    Sets the expression that is used to compute how far from the lines the text will be drawn.
    void
    setRepeated(boolean repeated)
     

    Methods inherited from interface LabelPlacement

    accept
  • Method Details

    • getPerpendicularOffset

      Expression getPerpendicularOffset()
      The PerpendicularOffset element of a LinePlacement gives the perpendicular distance away from a line to draw a label.

      The distance is in uoms and is positive to the left-hand side of the line string. Negative numbers mean right. The default offset is 0.

      Returns:
      Expression
    • getInitialGap

      Expression getInitialGap()
      InitialGap specifies how far away the first graphic will be drawn relative to the start of the rendering line
      Returns:
      Expression
    • getGap

      Expression getGap()
      Gap gives the distance between two graphics.
      Returns:
      Expression
    • isRepeated

      boolean isRepeated()
      If IsRepeated is "true", the label will be repeatedly drawn along the line with InitialGap and Gap defining the spaces at the beginning and between labels.
      Returns:
      boolean
    • isAligned

      boolean isAligned()
      Labels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.
      Returns:
      boolean
    • isGeneralizeLine

      boolean isGeneralizeLine()
      GeneralizeLine allows the actual geometry, be it a linestring or polygon to be generalized for label placement. This is e.g. useful for labelling polygons inside their interior when there is need for the label to resemble the shape of the polygon.
      Returns:
      boolean
    • accept

      Object accept(TraversingStyleVisitor visitor, Object extraData)
      calls the visit method of a StyleVisitor
      Specified by:
      accept in interface LabelPlacement
      Parameters:
      visitor - the style visitor
    • setPerpendicularOffset

      void setPerpendicularOffset(Expression offset)
      Sets the expression that is used to compute how far from the lines the text will be drawn. See getPerpendicularOffset() for details.
    • setRepeated

      void setRepeated(boolean repeated)
    • setGeneralized

      void setGeneralized(boolean generalized)
    • setAligned

      void setAligned(boolean aligned)
    • setGap

      void setGap(Expression gap)
    • setInitialGap

      void setInitialGap(Expression initialGap)