[Geoserver-users] How to make graphics not follow line in line symboliser?

I have a simple line symbolizer with a graphic stroke on top. By default it seems like the symbol will rotate to follow the direction of the line.

shape://oarrow

#000000

2

24

How can I force the symbol not to rotate?

I have tried to include the TextSymboliser VendorOption followLine, but the SLD wont validate with it.

There is a question on GIS.SE with the same question: http://gis.stackexchange.com/questions/58776/sld-disable-follow-line

Regards, Casper

On Mon, Jul 21, 2014 at 10:18 AM, Casper Børgesen (CABO) <CABO@anonymised.com...>
wrote:

I have a simple line symbolizer with a graphic stroke on top. By default
it seems like the symbol will rotate to follow the direction of the line.

<LineSymbolizer>

  <Stroke>

    <GraphicStroke>

      <Graphic>

        <Mark>

          <WellKnownName>shape://oarrow</WellKnownName>

          <Stroke>

            <CssParameter name="stroke">#000000</CssParameter>

            <CssParameter name="stroke-width">2</CssParameter>

          </Stroke>

        </Mark>

        <Size>24</Size>

      </Graphic>

    </GraphicStroke>

  </Stroke>

</LineSymbolizer>

How can I force the symbol not to rotate?

I have tried to include the TextSymboliser VendorOption *followLine*, but
the SLD wont validate with it.

There is no way to do that, the SLD specification says:

"A repeated linear graphic is plotted linearly and has its graphic
symbol bent around the curves of the line string"

In order to do what you want we'd need to add a new vendor option to force
the out of spec behavior,
and some code would have to be written to implement it.

Feel free to:
* open a ticket for a new feature request at
http://jira.codehaus.org/browse/GEOT
* implement it and make a pull request on github, or
* look into commercial support options to have someone implement it for you
  (
http://docs.geotools.org/stable/userguide/welcome/support.html#commercial-support
)

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi Andrea.

Thanks for your quick clarification. I have created a feature request: http://jira.codehaus.org/browse/GEOS-6585

Regards, Casper

···

On Mon, Jul 21, 2014 at 10:18 AM, Casper Børgesen (CABO) <CABO@…4891…> wrote:

I have a simple line symbolizer with a graphic stroke on top. By default it seems like the symbol will rotate to follow the direction of the line.

shape://oarrow

#000000

2

24

How can I force the symbol not to rotate?

I have tried to include the TextSymboliser VendorOption followLine, but the SLD wont validate with it.

There is no way to do that, the SLD specification says:

"A repeated linear graphic is plotted linearly and has its graphic

symbol bent around the curves of the line string"

In order to do what you want we’d need to add a new vendor option to force the out of spec behavior,

and some code would have to be written to implement it.

Feel free to:

  • open a ticket for a new feature request at http://jira.codehaus.org/browse/GEOT

  • implement it and make a pull request on github, or

  • look into commercial support options to have someone implement it for you

(http://docs.geotools.org/stable/userguide/welcome/support.html#commercial-support)

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it