I am using the following CSS to draw land parcels and label each with the
street number of the house:

* { 
        stroke: #a9a9a9;
        stroke-width: 1;
        label: [street_label];
        label-geometry: [centroid(geom)];
        label-anchor: 0.5 0.5;
        font-family: 'Tahoma';
        font-opacity: 0.65;
        font-fill: black;
        halo-radius: 2;
        halo-color: white;
        halo-opacity: 0.65;
        font-size: 10;
        -gt-label-auto-wrap: 80;
}

Including "label-geometry: [centroid(geom)];" results in polygons whose
centroids are close to the edge of each tile being ommited.

Taking this out results in mutiple labels on these polygons as the centriod
of the intersection of each tile and polygon is used for labeling.

In the SLD documentation there is the "partials" vendor option
http://docs.geoserver.org/stable/en/user/styling/sld-reference/labeling.html#partials
which if I understand the description correctly would label each polygon at
its centroid regardless of where the tile cuts it.

Is my understanding of this correct?
Has an equivalent been implemented in the CSS Styling extension?



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/CSS-styling-label-all-polygons-at-centroid-tp5234613.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to