PF-Friess ha scritto:
> Hi, 
> 
> I am testing GeoTools for creating shape files. I typically have to deal
> with a couple million points (~1 - 3 millions). Thereore, I am looking for a
> way to sequentially write features to the shapfile. I repeatedly generate a
> "FeatureCollection<SimpleFeatureType, SimpleFeature> collection", add the
> collection to the "FeatureStore<SimpleFeatureType, SimpleFeature>
> featureStore" and call transaction.commit. It seems to me that whenever I
> call transaction.commit all features in the featureStore are written to
> file, as the more features I add the slower the transaction.commit. 

Indeed, each time you commit the shapefile is fully rewritten, thus
the slowdown.

> How can I control the process of writing features to a shap file, such that
> I can sequentially add a "FeatureCollection<SimpleFeatureType,
> SimpleFeature> collection" to the shape file?

Use a feature writer, and a single transaction, that should do it (I 
hope). Jesse, Jody, if you can provide more details...
Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to