On Tue, Mar 11, 2014 at 11:06 PM, Michael Romero
<[email protected]>wrote:
> All,
>
> I am trying to create a label that consists of some text with a
> rectangular border around it. I currently have a TextSymbolizer with a
> Label and a Graphic using the WellKnownName "square". This gets the
> desired result for a single line of text but if the text contains multiple
> lines the square graphic is not placed correctly.
>
> I am reading from a PostgreSQL table that contains the text with new
> lines. I can also get the same result by using a single line and adding a
> very small autoWrap to create multi-line text. Here is an example of the
> text I am inserting:
>
> UDPATE my_table SET label=E'First line\nSecond line\nThird line';
>
>
> This thread is similar but I think was created before this was implemented
> at all:
>
> http://osgeo-org.1560.x6.nabble.com/SLD-Graphic-inside-
> TextSymbolizer-Relative-placements-td4992671.html
>
>
> After playing with all the SLD options I believe this is a bug and I am
> beginning to look through the GS/GT code. Has anyone seen this before? If
> not, can someone point me to the classes I should be looking at?
>
> I'm using PostgreSQL 9.0 with PostGIS 1.5.2 and tried both GeoServer 2.2.4
> and 2.4.4. Attached is my SLD and images of a single line and multi line
> text. I'm using a point geometry that is located in the middle of the text
> in both images.
>
Yes, I believe this might be a bug. The class you should be looking into is
this one:
https://github.com/geotools/geotools/blob/master/modules/library/render/src/main/java/org/geotools/renderer/label/LabelPainter.java
Cheers
Andrea
--
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
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
-------------------------------------------------------
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users