visualize a DefaultFeatureCollection in UDig

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

visualize a DefaultFeatureCollection in UDig

alcesgabbo
Hi everybody,
using Geotools I can visualize a DefaultFeatureCollection in this way:

 DefaultFeatureCollection deffc = new DefaultFeatureCollection(collection);
       
     map.addLayer(deffc, null);  
    JMapFrame.showMap(map);

But how can I create a Udig layer starting from a DefaultFeatureCollection (and then visualize the data on a IMap) ?

Thanks.
Alberto



_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Reply | Threaded
Open this post in threaded view
|

Re: [udig-devel] visualize a DefaultFeatureCollection in UDig

Jody Garnett-2
In uDig we try and put users in control; so we ask that you add your FeatureColection to the catalog as a temporary entry; this allows users to save the content out to a shapefile or something if they want to do so.

The documentation on creating a temporary resource is here:
- http://udig.refractions.net/confluence/display/DEV/2+Catalog

ICatalog:
  • createTemporaryResource( Object ) - used to create a temporary resources, usually by using a FeatureType
  • getTemporaryDescriptorClasses() - list of classes for which a temporary resource can be created
You will often find that people create their own map graphic if they want to provide feedback visually (this is the other reason developers sometimes ask how to draw a feature collection).
-- 
Jody Garnett

On Monday, 7 November 2011 at 8:14 PM, Alberto Debiasi wrote:

Hi everybody,
using Geotools I can visualize a DefaultFeatureCollection in this way:

 DefaultFeatureCollection deffc = new DefaultFeatureCollection(collection);
       
     map.addLayer(deffc, null);  
    JMapFrame.showMap(map);

But how can I create a Udig layer starting from a DefaultFeatureCollection (and then visualize the data on a IMap) ?

Thanks.
Alberto


_______________________________________________
User-friendly Desktop Internet GIS (uDig)


_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users