This would be a good example (animation) where hitting the "cache" checkmark in the style page[1] would be interesting. It uses some experimental geotools code to cache some features in memory (and lazily pull more into memory if the user pans).
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. 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. -- 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
