It might be unnecessary overhead, but for labels, we've taken to handling
the labeling in a separate openlayers layer, hidden from the table of
contents and always on, and make the tile size really large, say 1024x1024.
It makes for big requests on the server initially, but once its cached, the
actual PNGs being delivered are pretty fast, probably even faster if you
applied some optimization/palettes to the pngs in the cache.  Don't know yet
how/whether this scales well to delivery to thousands of users though... .

Steve

Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
s...@clevelandmetroparks.com
clevelandmetroparks.com





-----Original Message-----
From: Andrea Aime [mailto:andrea.a...@geo-solutions.it] 
Sent: Tuesday, August 09, 2011 2:13 AM
To: Rohan Parkes
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Labels repeating in polygon

On Tue, Aug 9, 2011 at 3:39 AM, Rohan Parkes <melanchtho...@gmail.com>
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users




------------------------------------------------------------------------------
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to