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
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 182 Announcement and News
- 942 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 581 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 245 How I use Global Mapper
- 111 Global Mapper Forum Website
