Jody, Thanks for the quick response. Never heard of the sld cache feature before. Since net.refractions.udig.style.cache.CacheContent is programatically not accessible from outside I just added layer.getStyleBlackboard().put("net.refractions.udig.style.cache", true ); to my code. It works.

But I wonder why the map is drawn twice during an update: first time without the layer (but all other layers) and then immediately after the map including this layer is drawn. As a result the map flickers with each update.

There are designs to take this further if needed; create your own custom
renderer (not the geotools one) and convert the geometry to java 2d
shapes for the current screen position and resolution (you can use the
utility classes in GeoTools for this part). Your map graphic can then
animate just the shapes; and not the full on feature and geometry
implementation.

Ok, I already thought thought about map graphics but then I have to care for all the zoom and pan actions.

Which utility classes in GeoTools?


Let me know how the cache button works for you; if not I would be
willing to work on the RFC page with you can collaborate on the design
if the result was contributed back to uDig.

Ok, I'll test it a bit more and then I'll let you know.

Thanks again!
Matthias


--
Jody Garnett
[1] http://udig.refractions.net/confluence/display/EN/Feature+Style+Pages

On Tuesday, 6 September 2011 at 8:30 PM, Matthias Lendholt wrote:

Hi all


In our tsunami early warning system
(http://udig.refractions.net/gallery/dews/) we are using wave
propagation models. See attached image: A shapefile is providing the
isochrones. A dynamically generated sld provides the color gradient
which is based on an attribute containing the arrival time. The thick
red isochrone is updated in real-time showing the current position.
Depending on our models the update interval is between 12seconds and 2
minutes and rendering was not an issue.

As a new feature we would like to provide play back / fast forward
functionality to visualize the wave propagation. This means the
highlighted iso chrone will move quite fast, and the map has to be
updated every second. I tried it with the existing code but the
rendering gets stalled.

Currently on each update the sld is updated:

layer.getStyleBlackboard().put(SLDContent.ID, style);
layer.refresh(null);

I'm not sure whether this is the best way to update the styling.

The shapefile contains about 4300 Linestring features. Maybe this is to
heavy for animation-like map updates?

Many thanks in advance for any hints or suggestions.

Matthias
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Attachments:
- isochrones.jpg



_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


--
[[email protected]]
GFZ German Research Centre for Geosciences
CeGIT Centre for GeoInformation Technology
Tel +49 331 288-1687; FAX +49 331 288-1703
Telegrafenberg A20, 14473 Potsdam, Germany
Blog http://zeigertelegraph.gfz-potsdam.de
Contact MECARD QR Code: http://goo.gl/488J
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to