[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [udig-devel] splitting line segment | 
Andrea Antonello - HydroloGIS wrote:
Ok, I get the proper arraylist of features (finalFeature) at the end:
I create the collection:
   FeatureCollection fcollection = FeatureCollections.newCollection();
        for( int i = 0; i < finalFeature.size(); i++ ) {
            fcollection.add(finalFeature.get(i));
        }
which I then write:
        FeatureStore store = (FeatureStore) ds.getFeatureSource();
        store.addFeatures(featureCollection);
And get one single feature in my new created shapefile instead of a lot
of single ones... :(
What is going wrong?
  
I think we may be stuck on the FeatureID thing - a feature collection 
cannot hold two features with the same ID (it considers them the same 
feature).
When you did your FeatureType.create ...which one of these did you use?
- FeatureType.create( attributes )
- FeatureType.create( id, attributes )
I would also ask that you start a Transaction - if not adding the 
features to the shapefile will take a lot longer?
Jody