[gdal-dev] FileGBD vs OpenFileGBD, a few of questions

Even Rouault even.rouault at spatialys.com
Mon Feb 11 08:31:40 PST 2019


> 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


More information about the gdal-dev mailing list