Skip to main content

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

Thanks!  DXF is a vector format for CAD.  I already have code to convert a
CAD file to a geotools FeatureCollection.  So would the best approach at this
point be to just turn it into a FeatureSource (which the UDIG renderer can
already deal with)?

Wendy

-----Original Message-----
From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jody Garnett
Sent: Saturday, May 21, 2005 12:11 AM
To: User-friendly Desktop Internet GIS
Subject: 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


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


Back to the top