> Let's say I would like to "kickstart" the index, it seems like one would
> have
> to iterate over all the features. Surely OGR has to read them all, but the
> client
> application might not be interested in the result, only in the side effect
> (index
> creation indeed).
> In that case, is there any faster way to get the index built, other than
> just
> iterating over every single feature?

What you can do (until OGR becomes smarter at a later point...) is:
SetAttributeFilter("0 = 1")
GetNextFeature()

This will iterate over all the features and build the index.

> 
> Also, are DataSource objects thread safe, can one perform multiple reads in
> parallel over them?

No, an object should never be used by more than one thread at a time.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to