Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

invalid COG from GDAL 3.1.0 onwards

See original GitHub issue

Not sure whether this is the right place to report this but it seems relevant as it can be reproduced using rio cogeo create and rio cogeo validate.

Use the files in to reproduce:

rio cogeo create temp.tif cog.tif && rio cogeo validate cog.tif with GDAL 3.0.4 creates a COG and validation outputs this:

Reading input: /temp.tif
Adding overviews...
Updating dataset tags...
Writing output to: /cog.tif
/cog.tif is a valid cloud optimized GeoTIFF

whereas running the same command with GDAL 3.1.0 (also tested 3.1.1 and 3.1.2 with the same result) makes rio cogeo validate return an error:

Reading input: /temp.tif
Adding overviews...
Updating dataset tags...
Writing output to: /cog.tif
The following errors were found:
- The offset of the main IFD should be 8 for ClassicTIFF or 16 for BigTIFF. It is 192 instead
/cog.tif is NOT a valid cloud optimized GeoTIFF

Again, I guess the error rather has its origin in either GDAL itself or rasterio, however I think it is worth at least documenting it here as it affects COG creation using rio-cogeo.

I’ll investigate further on the GDAL and rasterio issue trackers but do you have a clue where the issue could be?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

rouaultcommented, Aug 5, 2020

Would be nice to just be able to do GetMetadataItem("GDAL_GHOST_AREA_METADATA")


rouaultcommented, Aug 3, 2020

yon’t have access to the bytes directly

you can probably relax the test on the location of the first IFD to be within the first 200 bytes or so

Read more comments on GitHub >

github_iconTop Results From Across the Web

[gdal-dev] Cannot Build GDAL 3.1.0 on Ubuntu 18.04
Hello all, I am trying to build GDAL 3.1.0 on my machine with Ubuntu ... rasterlite2.cpp:2283:57: error: invalid conversion from 'void*' to ...
Read more >
COG Driver not recognized in GDAL 3.2.0 - GIS Stack Exchange
I want to generate a Cloud Optimized Geotiff (COG) using Python (with Anaconda environment). I wanted to use GDAL 3.2. 0 since it...
Read more >
Download — GDAL documentation
Conda . Conda can be used on multiple platforms (Windows, macOS, and Linux) to install software packages and manage environments. Conda packages...
Read more >
node-gdal-async - npm
Bindings to GDAL (Geospatial Data Abstraction Library) with full async support. ... TypeScript support is available beginning with gdal-async@3.1.0.
Read more >
Error while installing GDAL - Stack Overflow
Check that you installed GDAL using this command gdal-config --version. Then run this commands: pip download="some_path" GDAL cd some_path ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found