Fabio Da Soghe ha scritto:
Hello list.
I'm using geoserver 1.5.4 which has the bug GEOT-1504 about rendering
rasters (coverages) with the BUFFER WMS vendor option fixed.
It seems there are still problems: attached you find two maps, one
(raster_no_buffer.png) is a map without the buffer option; the second
image (raster_buffer_160.png) is the same region, at the same scale,
with same feature types but with the BUFFER option = 160. It's a
quite different image quality. We're using OpenLayer with tiles
256x256 pixels.
Hmm... I first tried with 160 and could not see anything wrong, then
I realized geoserver previews have meta-tiling enabled so the
actual rendering tile is 256x3 pixels wide. I then tried with 1600
and yes, I can reproduce the issue.
I'll fix it for GeoServer 1.6.0-rc2, but probably not in 1.5.x,
that branch is "dead" as far as OpenPlans is concerned, that is,
we won't release a 1.5.5. If you really need one, you'll have to
create it by yourself or find someone that can do it for you.
Moreover, I don't understand well the behaviour of the BUFFER
parameter. From the online documentation, it's the number of pixels
Geoserver takes into account when filtering features to render in the
tile (in order to render labels on the edge too, needed for tiled
clients). But even with such a big amount (160 is near the tile's
dimension), some point labels are still missing near tile's borders,
without apparent reason (that I can understand). I mean: the point
isn't near another point which can overlap with (and I even have
spaceAround = -10 in the SLD for that feature type). If this can be
an issue, I can post another sample.
It depends. Does the label of the point cross the tile boundaries (the
tile boundaries, not the buffered tile).
If so, the label will never be drawn, by design, no matter how
big is the buffer you choose, because there is no way to tell if
the label will conflict with neighbour ones. Label conflict resolution
is a "global" problem, to solve it completely you have to label
the whole map in one shot. To render the map piece wise one has
to limit the area involved, and that is done by only drawing
labels that fall completely inside the current tile (the tile, not
the buffered version). I tried to put some more info here:
http://docs.codehaus.org/display/GEOS/Rendering+and+tiling+issues+research
If you can find a more clever algorithm let us know, we're always
in search of good solutions to hard problems.
In the meantime, a workaround is to use meta tiling, that you can
enable using two extra parameters in the request:
http://docs.codehaus.org/display/GEOSDEV/On+the+fly+meta+tiling
http://docs.codehaus.org/display/GEOSDOC/WMS+vendor+parameters
Also have a look at GeoServer preview, it uses meta tiling by
default.
If 3x3 meta tiles are not enough, I suggest you try to use
TileCache, that allows you to setup 5x5 or bigger ones (meta tiles
will only mitigate the issue, but the problem will present itself
again at the meta tile borders).
Cheers
Andrea