[gdal-dev] Create big COG file (C++)
even.rouault at spatialys.com
Mon Sep 14 10:48:42 PDT 2020
> I want to create a big (I mean bigger than my RAM size) COG file in C++
> with GDAL 3.1.
> COG driver does not have the "Create()" method, but "CreateCopy()". I am
> not sure how I have to do it. Should I Create() first the dataset with the
> MEM driver, write on it, and then call the CreateCopy with the COG driver?
> (by the way, before closing the MEM dataset? Is then everything copied?)
You shouldn't use the MEM driver for datasets that can't fit entirely into RAM.
MEM datasets are temporary. Once you've closed the dataset handle, it is destroyed. So if
you use a MEM dataset, you must pass to CreateCopy() the handle you got when calling
Create() for the MEM dataset
> Or should I use a normal GTiff dataset, and then CreateCopy() with
> the COG driver?
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev