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. 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?
Thanks for any help,
Matthias
Matthias Schallenmüller
PTV AG
ITS Traffic Management Software
Tel.: +49 721 96 51-324
Fax: +49 721 96 51-599
E-Mail: matthias.schallenmueller@anonymised.com.2517…
PTV
Planung Transport Verkehr AG
Stumpfstraße 1
76131 Karlsruhe
Germany
http://www.ptv.de
http://www.ptv-vision.de
PTV Planung Transport Verkehr AG
Hauptsitz / Headquarters: Karlsruhe
Vorstand / Board of Directors: Dr.-Ing. Hans Hubschneider, Dr.-Ing. Thomas Schwerdtfeger, Dr. Joachim Schmidt, Harald Holberg, Thomas Haupt, Vincent Kobesen
Vorstandsvorsitzender / CEO: Dr.-Ing. Hans Hubschneider
Vorsitzender des Aufsichtsrates / Chairman of the Supervisory Board: Dr. Frank-Jürgen Weise
Handelsregister / Commercial Register (HRB-Nr): 109262
Amtsgericht / District Court: Mannheim
(attachments)


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.