On Wed, Aug 15, 2012 at 11:29 AM, Rahkonen Jukka
<[email protected]>wrote:
> Hi,****
>
> ** **
>
> > What you are experiencing is that for polygons, the anchor****
>
> > point used for labelling is the centroid of the visible portion****
>
> > of the polygon. So for each small tile image that covers your****
>
> > polygon, a new anchor point is computed and the label is drawn.****
>
> ** **
>
> There must be something obvious that I cannot see, but why not****
>
> to have an option to use the real centroid of the polygon as anchor ****
>
> point instead of the centroid of the visible portion when the goal****
>
> is to create tiles?
>
There is not reason not to have it indeed, it's just works that needs
doing, and code
does not write itself :-p
It's also not easy because by the time the polygon gets to the labelling
enging the
polygon is clipped to the viewing area already, an option could be to have
a
filter function called "label point" that can be used when specifying the
geometry:
<TextSymbolizer>
<Geometry>
<ogc:Function name="labelPoint">
<ogc:Property>the_geom</ogc:Property>
</ogc:Function>
</Geometry>
...
</TextSymbolizer>
There is this common fallacy that the centroid is a good label point, while
try in
most simple cases there is no guarantee it actually falls inside the polygon
(think of a doughnut), a label point instead should always be inside or at
worse
on the border (which is something the labeler in its default configuration
guarantees instead)
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it 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 962313
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users