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:
<Rule>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="http://mywebsite.fr/img/test.png"/>
<Format>image/png</Format>
</ExternalGraphic>
</Graphic>
</PointSymbolizer>
</Rule>
Here is what I'd like to achieve (red dot = anchor point):
<http://osgeo-org.1560.x6.nabble.com/file/n5275180/anchor_point.png>
The doc <http://
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/pointsymbols.html>
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.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hi,
I have a same problem. I use GeoServer 2.8, but I can not rotate ttf symbol around a specific point, instead of centerpont. We have arrows point symbols, to rotate around its base point, not the center point. I don’t want to create two times longer png symbols from all ttf symbol to get centerpoint at the base point of an arrow symbol. But it seems it is the only way yet.
But any tips&tricks are helpful about this topic!
Thanks for advance!
Zsolt Magyar
···
2016-07-07 16:11 GMT+02:00 wiltomap <wiltoma@anonymised.com>:
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:
image/png
Here is what I’d like to achieve (red dot = anchor point):
<http://osgeo-org.1560.x6.nabble.com/file/n5275180/anchor_point.png>
The doc <http://
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/pointsymbols.html>
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.
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Hi ! Thanks for your post. I'm working with SVG files (not PNG). Anyway, even
two times longer SVG files doesn't allow rotation around base point (it
changes nothing compared to original unmodified SVG files). I would be ready
to resize all my SVG files to solve the problem but it is not a solution!
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180p5275661.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hi,
I have a layer where I had to visualize antenna directions of a telco network. I use SVG there, rotated in the direction the antenna is facing. The result is something like this:

The SVG symbol’s height is twice of the actual shape, so the rotation point is on the middle:

The style looks like:
image/svg+xml
sizemul
1
20
AntAzymuth
I’m using GeoServer 2.7.1, but as far as I remember it worked on 2.6.x too.
BR,
Balázs Eigner
···
2016-07-11 8:04 GMT+02:00 wiltomap <wiltoma@anonymised.com>:
Hi ! Thanks for your post. I’m working with SVG files (not PNG). Anyway, even
two times longer SVG files doesn’t allow rotation around base point (it
changes nothing compared to original unmodified SVG files). I would be ready
to resize all my SVG files to solve the problem but it is not a solution!
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180p5275661.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Yes, unfortunately it works this way only. But I have not only one layer or feature_type to rotate. I’d like to create a pretty cartographic map. I have many rotated symbols, and it’s hard to create svg, or png from every tff symbol. So it’s not easy, but I have to do this way. Nevertheless, the QSIG exports SLD files with symbols’ anchor points, but it not works either.
Zsolt Magyar


···
2016-07-11 9:33 GMT+02:00 Balázs Eigner <eigner.balazs@anonymised.com>:
Hi,
I have a layer where I had to visualize antenna directions of a telco network. I use SVG there, rotated in the direction the antenna is facing. The result is something like this:
![Szövegközi kép 1]()
The SVG symbol’s height is twice of the actual shape, so the rotation point is on the middle:
![Szövegközi kép 2]()
The style looks like:
image/svg+xml
sizemul
1
20
AntAzymuth
I’m using GeoServer 2.7.1, but as far as I remember it worked on 2.6.x too.
BR,
Balázs Eigner
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
2016-07-11 8:04 GMT+02:00 wiltomap <wiltoma@anonymised.com>:
Hi ! Thanks for your post. I’m working with SVG files (not PNG). Anyway, even
two times longer SVG files doesn’t allow rotation around base point (it
changes nothing compared to original unmodified SVG files). I would be ready
to resize all my SVG files to solve the problem but it is not a solution!
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180p5275661.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Hi Zsolt,
There is the AnchorPoint tag, but when this was asked in 2012, Andrea said that it’s a SLD 1.1 thing and not supported in GeoServer:
http://osgeo-org.1560.x6.nabble.com/SLD-Point-Symbolizer-Anchor-Point-multiple-symbols-at-same-point-td5007067.html
You can give it a try and see if it’s come in over the past few years. I believe Displacement (also mentioned in that post) has been implemented since.
If not, you can fund its development to get it implemented (that’s what happened with Displacement).
Cheers,
Jonathan
---- On Mon, 11 Jul 2016 12:17:08 +0100 Zsolt Magyar zmagyar77@anonymised.com wrote ----
Yes, unfortunately it works this way only. But I have not only one layer or feature_type to rotate. I’d like to create a pretty cartographic map. I have many rotated symbols, and it’s hard to create svg, or png from every tff symbol. So it’s not easy, but I have to do this way. Nevertheless, the QSIG exports SLD files with symbols’ anchor points, but it not works either.
Zsolt Magyar
2016-07-11 9:33 GMT+02:00 Balázs Eigner <eigner.balazs@anonymised.com>:
Hi,
I have a layer where I had to visualize antenna directions of a telco network. I use SVG there, rotated in the direction the antenna is facing. The result is something like this:

The SVG symbol’s height is twice of the actual shape, so the rotation point is on the middle:

The style looks like:
image/svg+xml
sizemul
1
20
AntAzymuth
I’m using GeoServer 2.7.1, but as far as I remember it worked on 2.6.x too.
BR,
Balázs Eigner
2016-07-11 8:04 GMT+02:00 wiltomap <wiltoma@anonymised.com>:
Hi ! Thanks for your post. I’m working with SVG files (not PNG). Anyway, even
two times longer SVG files doesn’t allow rotation around base point (it
changes nothing compared to original unmodified SVG files). I would be ready
to resize all my SVG files to solve the problem but it is not a solution!
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180p5275661.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Could displacement be a solution? For labeling these I use the following SLD:
Label_Anchor_X
0.5
Label_Displacement_X
Label_Displacement_Y
Label_Rotation
I precalculate the parameters in the database so not be needed to be done during rendering. Let’s say, you know your symbol is 10 pixel in hight and you want to rotate it 90 degrees CW around its base point (middle of the bottom line I mean), then you displace with 5 pixels on the X axis. The result is like this with labels (the blurry ones, sorry, I have no public example):

Okay, it only works if you know the size of the symbolizer if you want precise placement.
Sorry if I misunderstood the problem. Hope you will find a solution!
BR,
Balázs


···
2016-07-11 13:17 GMT+02:00 Zsolt Magyar <zmagyar77@anonymised.com>:
Yes, unfortunately it works this way only. But I have not only one layer or feature_type to rotate. I’d like to create a pretty cartographic map. I have many rotated symbols, and it’s hard to create svg, or png from every tff symbol. So it’s not easy, but I have to do this way. Nevertheless, the QSIG exports SLD files with symbols’ anchor points, but it not works either.
Zsolt Magyar
2016-07-11 9:33 GMT+02:00 Balázs Eigner <eigner.balazs@…84…>:
Hi,
I have a layer where I had to visualize antenna directions of a telco network. I use SVG there, rotated in the direction the antenna is facing. The result is something like this:
![Szövegközi kép 1]()
The SVG symbol’s height is twice of the actual shape, so the rotation point is on the middle:
![Szövegközi kép 2]()
The style looks like:
image/svg+xml
sizemul
1
20
AntAzymuth
I’m using GeoServer 2.7.1, but as far as I remember it worked on 2.6.x too.
BR,
Balázs Eigner
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
2016-07-11 8:04 GMT+02:00 wiltomap <wiltoma@anonymised.com>:
Hi ! Thanks for your post. I’m working with SVG files (not PNG). Anyway, even
two times longer SVG files doesn’t allow rotation around base point (it
changes nothing compared to original unmodified SVG files). I would be ready
to resize all my SVG files to solve the problem but it is not a solution!
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180p5275661.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
The AnchorPoint and Displacement only works with LabelPlacement in TextSymbolizer, and not with Graphic in PointSymbolizer as I realized. I’ve known the Displacement argument, but works only in case of labels.
But Thanks for your tries.
Zsolt



···
2016-07-11 14:37 GMT+02:00 Balázs Eigner <eigner.balazs@anonymised.com>:
Could displacement be a solution? For labeling these I use the following SLD:
Label_Anchor_X
0.5
Label_Displacement_X
Label_Displacement_Y
Label_Rotation
I precalculate the parameters in the database so not be needed to be done during rendering. Let’s say, you know your symbol is 10 pixel in hight and you want to rotate it 90 degrees CW around its base point (middle of the bottom line I mean), then you displace with 5 pixels on the X axis. The result is like this with labels (the blurry ones, sorry, I have no public example):
![Szövegközi kép 3]()
Okay, it only works if you know the size of the symbolizer if you want precise placement.
Sorry if I misunderstood the problem. Hope you will find a solution!
BR,
Balázs
2016-07-11 13:17 GMT+02:00 Zsolt Magyar <zmagyar77@anonymised.com>:
Yes, unfortunately it works this way only. But I have not only one layer or feature_type to rotate. I’d like to create a pretty cartographic map. I have many rotated symbols, and it’s hard to create svg, or png from every tff symbol. So it’s not easy, but I have to do this way. Nevertheless, the QSIG exports SLD files with symbols’ anchor points, but it not works either.
Zsolt Magyar
2016-07-11 9:33 GMT+02:00 Balázs Eigner <eigner.balazs@anonymised.com>:
Hi,
I have a layer where I had to visualize antenna directions of a telco network. I use SVG there, rotated in the direction the antenna is facing. The result is something like this:
![Szövegközi kép 1]()
The SVG symbol’s height is twice of the actual shape, so the rotation point is on the middle:
![Szövegközi kép 2]()
The style looks like:
image/svg+xml
sizemul
1
20
AntAzymuth
I’m using GeoServer 2.7.1, but as far as I remember it worked on 2.6.x too.
BR,
Balázs Eigner
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
2016-07-11 8:04 GMT+02:00 wiltomap <wiltoma@anonymised.com>:
Hi ! Thanks for your post. I’m working with SVG files (not PNG). Anyway, even
two times longer SVG files doesn’t allow rotation around base point (it
changes nothing compared to original unmodified SVG files). I would be ready
to resize all my SVG files to solve the problem but it is not a solution!
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180p5275661.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
You might want to try a Geosever 2.8 or earlier… I am not sure it will help, but at least it is a supported version
Cheers
Andrea
Il 07 lug 2016 16:36, “wiltomap” <wiltoma@anonymised.com> ha scritto:
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:
image/png
Here is what I’d like to achieve (red dot = anchor point):
<http://osgeo-org.1560.x6.nabble.com/file/n5275180/anchor_point.png>
The doc <http://
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/pointsymbols.html>
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.
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Thanks Jonathan, and Andrea for your answers!
I think, I need to find some supporter person to fund this development for graphic displacement, or work with svg graphics instead of ttf. 
Regards:
Zsolt
···
2016-07-11 21:14 GMT+02:00 Andrea Aime <andrea.aime@anonymised.com>:
You might want to try a Geosever 2.8 or earlier… I am not sure it will help, but at least it is a supported version
Cheers
Andrea
Il 07 lug 2016 16:36, “wiltomap” <wiltoma@anonymised.com> ha scritto:
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:
image/png
Here is what I’d like to achieve (red dot = anchor point):
<http://osgeo-org.1560.x6.nabble.com/file/n5275180/anchor_point.png>
The doc <http://
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/pointsymbols.html>
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.
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Check the commercial support link at geoserver.org
Cheers
Andrea
···
2016-07-11 21:14 GMT+02:00 Andrea Aime <andrea.aime@anonymised.com>:
You might want to try a Geosever 2.8 or earlier… I am not sure it will help, but at least it is a supported version
Cheers
Andrea
Il 07 lug 2016 16:36, “wiltomap” <wiltoma@anonymised.com> ha scritto:
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:
image/png
Here is what I’d like to achieve (red dot = anchor point):
<http://osgeo-org.1560.x6.nabble.com/file/n5275180/anchor_point.png>
The doc <http://
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/pointsymbols.html>
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.
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/Is-it-possible-to-change-a-symbol-s-default-anchor-point-in-Geoserver-SLD-tp5275180.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users