[udig-devel] making temp Layer from FeatureCollection
Jan Jezek
h.jezek at centrum.cz
Fri Nov 10 06:33:42 PST 2006
Hi all,
I'm working on 'transformation' plugin (for RC5) and I've run in some problems during creating the Layer from temporary resource. I'm having the FeatureCollection (result from transformation) and I would like to make a temporary layer from that. I was searching a lot about this in mail list, but still can't understand how I should do it in right way.
When I do it this way it works:
map.getLayersInternal().add(newLayer);
newLayer.getGeoResource().resolve(FeatureStore.class,null).addFeatures(collection);
but when the Feature collection is big (and ussualy it is) and uDig starts rendering right after each feature is added, it is very very slow, so I tryed to add new features first and then to add the layer into the map, but then I get java.lang.NullPointerException
newLayer.getGeoResource().resolve(FeatureStore.class,null).addFeatures(collection);
map.getLayersInternal().add(newLayer);
Thanks for any help.
Jan.
More information about the udig-devel
mailing list