Polygons are labeled once at the centroid of the visible part of the polygon. But if you make a series of tiled requests then each tile will be labeled at the centroid of the polygon on that tile. To avoid this set the geometry element of the textsymbolizer to use the centroid function on the whole geometry, See https://gis.stackexchange.com/questions/37138/polygon-label-repeated-for-each-tile for a fuller explanation.
Ian On Fri, 18 Jan 2019 at 08:20, Eugene Podshivalov <[email protected]> wrote: > Hi all, > It is stated in the documentation > <https://docs.geoserver.org/latest/en/user/styling/sld/reference/labeling.html#pointplacement> > that by default polygons are labeled only once at centroid point, but > whatever parameters I define it always repeats a label within a polygon at > some fixed intervals. > > Does it work properly for anyone? > > My YSLD style looks at follows > > feature-styles: > - rules: > - symbolizers: > - polygon: > geometry: ${geom} > fill-color: '#da7171' > - text: > geometry: ${geom} > label: ${name} > font-family: SansSerif > font-size: 15 > fill-color: black > > and the result looks like this > [image: image.png] > > The same thing happens with the SLD style. > > Regards, > Eugene > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to > this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Ian Turton
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
