On Thu, Feb 2, 2012 at 1:54 AM, Yang <[email protected]> wrote:
> currently I collect all my features into one FeatureCollection,
> and then store them by
>
> shapeFileDataStore.addFeatures(collection)
>
>
> I assume the latter call writes the collection to disk, updating indexes (in
> the case of IndexedShapeFileDataStore).
>
> my question is, is it possible to write multiple collections into the
> dataStore before the store is closed ?

Yes, create a transaction, associate it with the store, do all the
adds you need, commit _and_ close the transaction

 in that case,
> will the index be properly updated (like B-Tree implementation ) ?

The spatial index will be updated. Actually the way things work
the whole shapefile gets rewritten, and so does the index
(the current implementation does not support in-place modification
of the shapefile)

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to