Export to Cloud Optimised Geotiff doesn't produce a valid COG
I am trying to export a 1band elevation raster to COG format, but the output doesn't return as valid in the COG validator produced. It also doesn't allow streaming via AWS S3 as a result.
https://github.com/rouault/cog_validator
Global Mapper Pro v23.0.1 (b100721) (647) [64-bit]- REGISTERED
example of an error:
The following errors were found:
- The offset of the main IFD should be 8. It is 132618208 instead
- The offset of the first block of overview of index 2 should be after the one of the overview of index 3
- The offset of the first block of overview of index 1 should be after the one of the overview of index 2
- The offset of the first block of overview of index 0 should be after the one of the overview of index 1
- The offset of the first block of the main resolution image should be after the one of the overview of index 3
Cog now run out of a simple command, is there a solution to export a valid COG from GM directly?
gdal_translate original.tif original-cog.tif -of COG -co COMPRESS=LZW -stats
Answers
-
I can see how the Global Mapper COG output differs from GDAL in terms of the ordering of the overview layers. Currently, the GM COG output is simply a tiled GeoTIFF with overview layers, but I've created GM-14443 to make the GM output match the criteria that GDAL uses.
Thanks,
Mike
Global Mapper Guru
-
That's great, thanks Mike, I look forward to the release.
-
I am recently experiencing a similar problem trying to validate a COG using rio-cogeos validate tool. From the 25.0 release notes it looks like the COG format should be recognized as COGformat. At least i assumed this was the case from this statement ".COG files are recognized as Cloud Optimized GeoTIFF format. The COG type is supported by Batch Convertor/Reproject - GM-14746". However i still get a similar error to the above stating the IFD is larger than 200 and the order of tiles is wrong.
This is using the layer -> export to COG function btw.
Any solution to this forthcoming?
-
I have bumped this up in priority in our queue. It turned out that fixing the TIFF file ordering issues for COG compatibility was much more difficult than I had anticipated, so it wasn't fixed quickly when the problem was initially reported.
Thanks,
Mike
Global Mapper Guru
-
Hi Mike, that's great thanks!
Categories
- 12.8K All Categories
- 5.7K Features Discussion
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 636 GM Script Language
- 54 User Scripts
- 114 GPS Features
- 417 Projection Questions
- 825 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 912 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 569 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 238 How I use Global Mapper
- 107 Global Mapper Forum Website