<div dir="ltr">What happens if you run it through "gdalwarp -of COG in.tif out.tif"?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 29, 2021 at 10:05 AM Javier Jimenez Shaw <<a href="mailto:j1@jimenezshaw.com">j1@jimenezshaw.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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-wrap;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-wrap;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">.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>