Matthias Schallenmüller ha scritto:
> Hi,
> 
>  
> 
> I have some questions about the renderer that is used to paint the 
> tiles. We are currently using geoserver as WMS service to display the 
> current traffic situation on a map. To display the red and green lines 
> that are indicating the current traffic state we are using transparent 
> images. (Have a look at ugly_gaps.png in the attachment to get an 
> impression of how it looks in the moment.)
> 
>  
> 
> The solution with the two transparent images works, but as you can see 
> it by far doesn`t look as good as googles solution 
> <http://maps.google.com/?ie=UTF8&ll=40.704066,-111.856613&spn=0.323774,0.488892&t=h&z=11&layer=t>.
>  
> To get a solution that is as nice as googles solution, painting the 
> lines seems to be the only way.. Therefore my idea was to implement a 
> renderer that is able to displace a line (see linedisplacement.png).
> 
>  
> 
> Unfortunately I cannot figure out how to tell geoserver to use another 
> renderer. It seems to me that geoserver is always using the 
> StreamingRenderer from geotools. Is this correct? Do you have any 
> suggestions how I can get geoserver to use another renderer? Or perhaps 
> are there any other ways I can displace lines?

It is correct, streaming renderer is the only choice and it will remain
the only choice in the short term.

However for your case I might have an alternative solution: geometry
transformations. See:
http://blog.geoserver.org/2010/03/17/extending-your-map-styling-with-geometry-transformations/
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/geometry-transformations.html

Now, we don't have a transformation ready that offsets a line, but
you could implement one (and contribute it back ;-) ), it's a matter
of implementing and registering a filter function (see some examples
in the GeoTools gt-main module).

The one drawback is that the transformations at the moment happen in
the original geometry coordinate space (meters, deegrees, depending on
what the original coordinates are). In theory I could make the current
scale denominator and DPI info as part of the enviroment variables
available to the "env" function used for param substitution, if you
pass them down into your function. Or look into having geometry 
functions work in pixel space as well. That would require significantly
more changes though.

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to