My code is as follows: List<SimpleFeature> data = -----------
DataStoreFactorySpi factory = new ShapefileDataStoreFactory(); Map<String, Serializable> create = new HashMap<String, Serializable>(); create.put("url", results.toURI().toURL()); create.put("create spatial index", Boolean.TRUE); DataStore dataStore = factory.createNewDataStore(create); dataStore.createSchema(newSchema); Transaction transaction = new DefaultTransaction(); String typeName = dataStore.getTypeNames()[0]; SimpleFeatureSource fs = dataStore.getFeatureSource(typeName); SimpleFeatureStore featureStore = (SimpleFeatureStore) fs; ListFeatureCollection newFeatures = new ListFeatureCollection(newSchema, data); featureStore.setTransaction(transaction); featureStore.addFeatures(newFeatures); try { transaction.commit(); } catch (IOException problem) { transaction.rollback(); throw problem; } finally { transaction.close(); } Is there a way to access the feature collection from this new datasource w/o rereading the file just produced. All my attempts resulted in exceptions due to the transaction being closed. Thanx Gaby ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users