You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see on the Spatial index, there is an option to close the index file, is there a way to flush?
Per Python Doc:
Flush the write buffers of the stream if applicable. This does nothing for read-only and non-blocking streams.
I think this would help for the creation of very large spatial indexes, so you can write very large indexes to disk without holding everything in memory before writing.
Desired Workflow:
from rtree import Index
idx = Index('rtree.index')
for cnt, g in enumerate(geoms):
idx.insert(cnt, g.bounds())
if cnt == 10000:
idx.flush()
I don't know if this is possible since it's just a wrapper on the c libraries, but I figured I'd ask here first.
Thanks
The text was updated successfully, but these errors were encountered:
There is no flush method on the Python implementation, but there is one in the libspatialindex C API called Index_Flush that could be wrapped and used. You might also get the same effect by forcing the index to close and open again.
I see on the Spatial index, there is an option to close the index file, is there a way to flush?
Per Python Doc:
Flush the write buffers of the stream if applicable. This does nothing for read-only and non-blocking streams.
I think this would help for the creation of very large spatial indexes, so you can write very large indexes to disk without holding everything in memory before writing.
Desired Workflow:
I don't know if this is possible since it's just a wrapper on the c libraries, but I figured I'd ask here first.
Thanks
The text was updated successfully, but these errors were encountered: