[gdal-dev] validate_cloud_optimized_geotiff.py returns invalid

Patrick Young patrick.mckendree.young at gmail.com
Fri Jan 29 13:34:55 PST 2021


What happens if you run it through "gdalwarp -of COG in.tif out.tif"?

On Fri, Jan 29, 2021 at 10:05 AM Javier Jimenez Shaw <j1 at jimenezshaw.com>
wrote:

> 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.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210129/ddb88175/attachment.html>


More information about the gdal-dev mailing list