Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Custom Renderer

Edwards, Wendy A ERDC-CERL-IL Contractor wrote:

Hi, we're working on some code to get UDIG to open and render DXF files.  It
seems likely that we'll need a custom renderer, though it should be possible
to extend BasicFeatureRenderer.  How should this be added to UDIG?  From what
I understand, we should create a new plugin to do this, rather than modify
existing code.  Is there any documentation explaining this?  I noticed that
the section on renderers didn't seem to be up yet.

Hi Wendy,

Can I ask for a bit more detail on what a DXF file is? Depending on the data type you may not need to
make a renderer at all (simply teach udig how to load your information).

The existing renderer makes use of "Style Layer Descriptor" allowing you to do all sorts of complicated things. The only reason to make a custom renderer is for speed (if you know more about your data you may be able to go faster), or for special things like CAD file formats that include per feature color information.

So the range of options varies from ....

Hooking into the geotools feature type system:
- create a GeoTools DataStore (for feature data)
- create two glue classes (IService and IGeoResource) to allow uDig to hold onto your files in a project

Or creating a renderer that works right from your file format:
- create a IRenderer (and associated Factory and Metrics class)
- the glue classes will still need to be written

Cheers,
Jody




Back to the top