Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] rendering, styles, attributes

Vince Darley wrote:

Now that uDig's performance looks pretty good for our purposes, I'd like to ask a few questions which I haven't been able to answer from reading the documentation.

Render style by attribute value: The shapefiles I'm using (e.g. that large one with lots of points) have various attributes associated with each points. I'd like to colour the points according to certain attribute values (e.g. vehicle_id). How would I go about doing that in uDig (or can you point me to an outline of how I might achieve this with further development)? I can see two paths to achieving this -- first just to have the ability to specify a render colour by attribute value, or second to split a layer by a given attribute, and then colour each newly-created layer manually.

Currently, the udig shapefile renderer supports the SLD spec which supports themed styling as you describe above. The downside is that the style editor for sld is very basic and does not yet support theming, but it is coming in the near future. You can however still use an sld with themed information in a couple of ways.

1. Name the sld the same name as the shapefile and it will automatically be loaded. Example: foo.shp, foo.sld 2. Drag and drop an sld document onto a layer in the udig layers view. This will cause the renderer to rerender with the appropriate styling information.

1-2 years ago we did a fair amount of work on the j2drenderer from geotools, to add a more performant selection/modification capability (no need to re-render everything just because a few features have changed colour/appearance). In the medium term we would probably want to use this, so I'm wondering what the path might be to have uDig use the j2d renderer (or something similar to that)? Are the recent "point" performance improvements to the shapefile renderer somehow intertwined with the lite-renderer being used by uDig, or are they elsewhere in the rendering pipeline? (Note: we'd probably be using a mixture of shapefiles and GML data for rendering purposes)

Yes, the uDig rendering pipeline has been setup to allow exacly this. And actually I have just recently wrote a tutorial on how to do this. I am hoping to publish it on our wiki in the near future.

Another question of slightly lesser importance: is uDig's rendering pipeline at all suited to the idea of adding a dynamic, animated layer (e.g. vehicles moving around a street network, or ships across a river/sea network) under some circumstances?

Not too sure how hard this one would be. Jesse can probably provide better feedback.


cheers,

Vince.

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




Back to the top