I'm using Geoserver 2.6. I was wondering if it was possible de specify the anchor point for a symbol other than the exact center of the symbol.

Here a piece of SLD file:

            <OnlineResource xlink:type="simple" xlink:href="http://mywebsite.fr/img/test.png"/>

Here is what I'd like to achieve (red dot = anchor point):

enter image description here


The doc says this:

Graphic symbols are rendered so that the center of the graphic extent lies on the placement point (or points, in the case of repeated or tiled graphics). If it is desired to have a graphic offset from a point (such as a symbol which acts as a pointer) it is necessary to offset the visible portion of the graphic within the overall extent. For images this can be accomplished by extending the image with transparent pixels. For SVG graphics this can be done by surrounding the shape with an invisible rectangle with the desired relative position.

I tried it out but this does not do the job... It seems that the invisible rectangle I positioned around the shape is ignored.

  • did you place the sld on the geoserver styles? – hamidmadani Jul 9 '16 at 14:32
  • I'm not sure to understand your question... Yes I did create a Geoserver style and connected my layer to this style. – wiltomap Jul 11 '16 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.