[gdal-dev] validate_cloud_optimized_geotiff.py returns invalid

Javier Jimenez Shaw j1 at jimenezshaw.com
Fri Jan 29 09:05:09 PST 2021


Hi all

I am generating a COG file with GDAL 3.2.0 (compiled in my Ubunut 18.04) in
C++
Nothing strange, just

GDALDriver* driver = GetGDALDriverManager()->GetDriverByName("COG");
driver->CreateCopy(dst.c_str(), srcDataset, true, ...);

where srcDataset is just another geotiff I opened in read mode.

Later, I run the python script to validate, and returns this:

./gdal/swig/python/samples/validate_cloud_optimized_geotiff.py
img_2962c146-95ec-4976-a33a-a83a8e659f88.tifcog.jpg.tiff
img_2962c146-95ec-4976-a33a-a83a8e659f88.tifcog.jpg.tiff is NOT a valid
cloud optimized GeoTIFF.
The following errors were found:
 - The offset of the main IFD should be 226. It is 26010218 instead
 - The offset of the IFD for overview of index 0 is 4016, whereas it should
be greater than the one of the main image, which is at byte 26010218

Am I doing something wrong?

Thank you
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210129/ce1f867e/attachment.html>


More information about the gdal-dev mailing list