[gdal-dev] Using ogr2ogr with limited memory

Even Rouault even.rouault at spatialys.com
Thu Sep 28 11:37:55 PDT 2023


Le 28/09/2023 à 20:17, Scott a écrit :
> Thanks for digging into that Even!
>
> Can I create my new .fgb in sections?
>
> If I limit the number of source rows with -sql, doing that multiple 
> times with -update, will it still build the entire R-tree when writing 
> to the destination?
That would actually be a bad idea. Appending in FlatGeobuf is not a 
native capability. It is emulated by storing into RAM the new features, 
and then writing at dataset closing the full .fgb file from the original 
one + the new features. You would actually need a lot more RAM than 
doing a single ogr2ogr run.
>
> I'm looking for a way to get the desired results.

Rent a bigger VM instance... or contribute a RAM-friendly implementation 
of the RTree building :-)

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list