Some addition:
It works for AnchorPointX/AnchorPointY = 0 and any rotation angle. Then it also works for AnchorPointX/AnchorPointY = 0.5 and rotation angle = 0. But fails for any other angle (e.g. 37). 2 examples with AnchorPointX/Y = 0.5 and rotation angle = 0 and 37:
http://www.sogis1.so.ch/sogis/projekte/kva/beta/x-0-5_y-0-5_rot-0.jpg
http://www.sogis1.so.ch/sogis/projekte/kva/beta/x-0-5_y-0-5_rot-37.jpg
PDF-output is not affected (?):
GS 1.7.1 with curved labels:
http://www.sogis1.so.ch:8080/geoserver/wms?LAYERS=kva_av_strnam&STYLES=label_test&SRS=EPSG%3A21781&FORMAT=application/pdf&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=607577.03125,227775.78125,608122.8125,228008.75&WIDTH=998&HEIGHT=426
GS 1.6.5:
http://www.sogis1.so.ch:8080/geoserver_devel/wms?LAYERS=kva_av_strnam&STYLES=label_test&SRS=EPSG%3A21781&FORMAT=image/png&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=607577.03125,227775.78125,608122.8125,228008.75&WIDTH=998&HEIGHT=426
Stefan
-----Ursprüngliche Nachricht-----
Von: Ziegler Stefan
Gesendet am: Montag, 12. Januar 2009 11:27
An: geoserver-users
Betreff: [Geoserver-users] Problems with curved labels (use_ng_labeller = true)
Hi
I really like the option to have curved labels. But it seems that I have problems with the placement of point-labels now: I’m using the “AnchorPoint” and “Rotation” option to place the label as defined in the data (see below). The labels with “use_ng_labeller” = true (in web.xml) are misplace now: http://www.sogis1.so.ch/sogis/projekte/kva/beta/ng_labeller_on.jpg Without the use_ng_labeller lines in the web.xml the labels are placed correct: http://www.sogis1.so.ch/sogis/projekte/kva/beta/ng_labeller_off.jpg
The red labels are from a GS 1.6.5 with exactly the same SLD definition (except a red halo and a bigger font-size). Is there anything I have to change to get the same behaviour back?
regards
Stefan
SLD snippet:
namhali
2
3
namvali
2
0
0
90.0
txt_rot
90.0
Mit freundlichem Gruss
Stefan Ziegler
Leiter Aufsicht
Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon 032 627 75 96
Telefax 032 627 75 98
stefan.ziegler@anonymised.com
http://www.so.ch
Ziegler Stefan ha scritto:
Some addition:
It works for AnchorPointX/AnchorPointY = 0 and any rotation angle. Then it also works for AnchorPointX/AnchorPointY = 0.5 and rotation angle = 0. But fails for any other angle (e.g. 37). 2 examples with AnchorPointX/Y = 0.5 and rotation angle = 0 and 37:
http://www.sogis1.so.ch/sogis/projekte/kva/beta/x-0-5_y-0-5_rot-0.jpg
http://www.sogis1.so.ch/sogis/projekte/kva/beta/x-0-5_y-0-5_rot-37.jpg
So what you're saying is that if you specify an angle other than 0
the angle is respected, but the anchor point is ignored and assumed
equal to the default?
PDF-output is not affected (?):
Not affected? Aah, yeah, the new labeller is used only in the raster
rendering code path, no matter what you specify in the config options:
http://jira.codehaus.org/browse/GEOS-2560
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Ziegler Stefan ha scritto:
Some addition:
It works for AnchorPointX/AnchorPointY = 0 and any rotation angle. Then it also works for AnchorPointX/AnchorPointY = 0.5 and rotation angle = 0. But fails for any other angle (e.g. 37). 2 examples with AnchorPointX/Y = 0.5 and rotation angle = 0 and 37:
http://www.sogis1.so.ch/sogis/projekte/kva/beta/x-0-5_y-0-5_rot-0.jpg
http://www.sogis1.so.ch/sogis/projekte/kva/beta/x-0-5_y-0-5_rot-37.jpg
So I did some testing on my own and it seems the text
is first moved to the specified anchor (which is not ignored)
and then rotated, but unfortunately not rotated around its anchor
point, but around its "origin" (the lower left corner of the text),
whilst the old labeller was rotating the labels around its anchor point
instead (which is the correct behaviour btw).
Have I got it right?
http://jira.codehaus.org/browse/GEOS-2561
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.