invalid COG from GDAL 3.1.0 onwards
See original GitHub issueIssue Description
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 validate.zip 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:
- Created 3 years ago
- Reactions:3
- Comments:12 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
See https://github.com/OSGeo/gdal/pull/2832
you can probably relax the test on the location of the first IFD to be within the first 200 bytes or so