On Tue, Aug 9, 2011 at 3:39 AM, Rohan Parkes <[email protected]> wrote: > I have a set of layers which represent grids from street directories, > running off a postGIS database. The grids are actually represented by > polygons, not lines. > > They are meant to display as WMS overlays with the grid reference centred in > the grid. However, I find that the labels repeat, appearing up to four times > in each polygon, but rather randomly, sometimes right on the line. > > According to the documentation I have read, labels should be centered on the > centroid of polygons, and should not repeat by default. I have tried > checking the data to see if there are other geometry types in the table that > might be confusing the representation, but there doesn't seem to be > anything. > > The only unusual thing is that the polygons are actually stored as > multipolygons. This is presumably because the data came originally from > MapInfo TAB files, which only supports the "MULTI" versions of polygons and > linestrings. > > So each row has geometry like: > > MULTIPOLYGON(((16390211.3882335 -5362787.10375356,16390897.8955332 > -5362785.11420676,16390895.8917824 -5362096.14445555,16390209.3844827 > -5362098.13385489,16390211.3882335 -5362787.10375356))). > > All the same, I don't think this should affect the labels. > > Can anyone explain why this is happening?
Because you are using tiling. Tiling and labels never mix properly, if a polygon is crossed by four tiles you'll get 4 labels, if a polygon is crossed by 20 tiles, you'll get 20 labels: each tile is a separate request to GeoServer, each one will be labelled. Tile caches normally do meta-tiling to reduce the effect, but that does not solve the issue fully, just makes it happen less often. Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
