What do SLD text symbolizers label when you have both a point symbolizer and a line symbolizer in a rule?

53 Views Asked by At

I am building a JavaFX renderer for shape files and a "point of ambiguity" has come up around text symbolizers.

I have an SLD feature type style for a feature type T as follows (abstracting from all the XML):

Rule
    Filter 
    PointSymbolizer
    LineSymbolizer
    TextSymbolizer

If a feature f satisfies the filter, we:

  • run the point symbolizer with f
  • run the line symbolizer with f

My question is: when the text symbolizer is run are we labeling the point from the point symbolizer, or the line from the line symbolizer? Or even both?

I think the answer to my question is that the TextSymbolizer must contain a LabelPlacement element, and the LabelPlacement element in turn must contain exactly one of a PointPlacement or LinePlacement, and that tells us whether we are labeling with respect to the point or the line. Is that correct?

If it is correct then there is a follow on issue -- if the rule looks like this:

Rule
    Filter 
    LineSymbolizer
    LineSymbolizer
    TextSymbolizer
         LabelPlacement
             LinePlacement

Then is the text symbolizer labelling both lines?

thx g

1

There are 1 best solutions below

6
Ian Turton On

It (like all symbolizers) will use the default geometry of the feature unless you specify a particular geometry by the Geometry tag.

For your 2nd question there's only one line not two.