NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
13 stars 10 forks source link

`geotiff_standard` output formatter fails to add color tables to geotiffs as of rasterio v1.3.10 #544

Closed jsolbrig closed 1 month ago

jsolbrig commented 1 month ago

Bug Report

What happened?

When a product is produced using the geotiff_standard OutputFormatter using rasterio v1.3.9, the color table is correctly added. After upgrading to v1.3.10, however, the color table doesn't get added so the resulting imagery comes out greyscale.

What should have happened?

Imagery should be produced using the appropriate color table.

Replicating the Issue

  1. Update pyproject.toml to require rasterio==1.3.10.
  2. Reinstall GeoIPS.
  3. Call ./tests/scripts/ahi.tc.WV.geotiff.sh > ahi.tc.WV.geotiff.sh.log.

The resulting log file should contain this line:

09_164228 geotiff_standard.py:121     INFO: GDAL signalled an error: err_no=1, msg='TIFFSetField:/home/jsolbrig/geoips/github/outdirs/preprocessed/tcwww/tc2020/SH/SH252020/tif/WV/himawari-8/20200405_000000_SH252020_ahi_himawari-8_WV_100kts_100p00_1p0.tif: Cannot modify tag "PhotometricInterpretation" while writing'

It should also show:

09_164228    log_setup.py:55   INTERACTIVE: ********************************************************************************
09_164228    log_setup.py:60   INTERACTIVE: ** BAD geotiffs do NOT match exactly                                          **
09_164228    log_setup.py:60   INTERACTIVE: ** output_product:                                                            **
09_164228    log_setup.py:60   INTERACTIVE: ** /home/jsolbrig/geoips/github/outdirs/preprocessed/tcwww/tc2020/SH/SH252020/tif/WV/himawari-8/20200405_000000_SH252020_ahi_himawari-8_WV_100kts_100p00_1p0.tif **
09_164228    log_setup.py:60   INTERACTIVE: ** compare_product:                                                           **
09_164228    log_setup.py:60   INTERACTIVE: ** /home/jsolbrig/geoips/github/geoips/tests/outputs/ahi.tc.WV.geotiff/20200405_000000_SH252020_ahi_himawari-8_WV_100kts_100p00_1p0.tif **
09_164228    log_setup.py:61   INTERACTIVE: ********************************************************************************

The incorrect output imagery should look like this: image

The correct comparison file looks like this: image

Environment

Checklist for Completion

Related Issues