Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] How to remove all features from a resource?

I found the solution after writing an email to the list:
 
static Filter NONE
in the Filter Interface is what I want
 
 
but  I have another problem:
 
I generate a resource with "createTemporaryResource(featureType)" and add some features to it. Later I want to reuse this resource (and the layer) and remove all features of this resource (using the code above). Then I add new Features to the (empty) resource but - and this takes me quite a long time to figure out - the resource has an internal envelope which is somehow depending on the map the resource (layer?) is bound to. Therefore the new Features are clipped with the (old) envelope even I set the envelope of the map to a new value. Is it possible to set the envelope / bounding box of an temporary layer manually like I can store it in a shapefile header?
 
tony roth
 
 

 

-----udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx schrieb: -----

An: udig-devel@xxxxxxxxxxxxxxxxxxxxx
 
I want to remove all features of an ressource with:
FeatureStore fs = layer.getGeoRessource().resolve(FeatureStore.class,null);
fs.removeFeatures(Filter arg0)
Is it the correct way?
Since I want to remove all features, I do not have to filter. What can I do?
I can take a FidFilter which contains all IDs of all features but I hope there is an easier way.
tony roth
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top