<div dir="ltr"><div>Hi all</div><div><br></div><div>I am generating a COG file with GDAL 3.2.0 (compiled in my Ubunut 18.04) in C++<br></div><div>Nothing strange, just<br><br><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">GDALDriver* driver = GetGDALDriverManager()->GetDriverByName("COG");<br>driver->CreateCopy(dst.c_str(), srcDataset, true, ...);</span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br></span></div><div>where srcDataset is just another geotiff I opened in read mode.</div><div><br></div><div>Later, I run the python script to validate, and returns this:</div><div><br></div><div><span style="font-family:monospace">./gdal/swig/python/samples/validate_cloud_optimized_geotiff.py img_2962c146-95ec-4976-a33a-a83a8e659f88.tifcog.jpg.tiff <br>img_2962c146-95ec-4976-a33a-a83a8e659f88.tifcog.jpg.tiff is NOT a valid cloud optimized GeoTIFF.<br>The following errors were found:<br> - The offset of the main IFD should be 226. It is 26010218 instead<br> - 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</span><br></div><div><br></div><div>Am I doing something wrong?</div><div><br></div><div>Thank you<br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div></div>