4

I'm trying to define an SLD for Line-Features (Using for WMS in Geoserver). The signature of the line mustn't go from startpoint to endpoint, but has to start 5 pixels AFTER the startpoint and has to end 5 pixels before the endpoint.

O______O

Background: I want to visualize the start-/endpoint from lines with a ring-symbol. The problem is, that the line mustn't intersect the ring-symbol. Normally, I would fill the ring-symbol, nevertheless, underlying polygon-features shouldn't be covered by the filling of the ring.

1 Answer 1

2

I cannot think of any way to do that out of the box, but if you can program in Java, there is a chance you can write a filter function that shrinks the lines for you.

Here are some examples of existing functions: http://docs.geoserver.org/stable/en/user/styling/sld-extensions/geometry-transformations.html

There is a tutorial about writing functions here: http://docs.geotools.org/latest/userguide/tutorial/function.html

The annoying part will be that the function works against the original geometry in its native CRS, while you want to shrink them by the pixels... passing the function the current scale denominator might work.

Alternatively, you can write a new "VendorOption" for LineSymbolizer (there is no tutorial for that though).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.