How to keep color interpretation when cropping IrRG Tiff file
Hi,
I need to clip some (IrRG) 3bands Geotiff using a "grid.shp" but I lose the original bands interpretation in the process, and I have tried everything I could... I have attached three screenshots, header (before), header (after), and false color image (IrRG) which is ok after the clip, whitout the proper color interp (Undefinined, Red, Green). Here is my code.
The question is, is there a way to keep the same color interpretation when cropping the files? Thanks for your help.
CODE:
GLOBAL_MAPPER_SCRIPT VERSION="1.00"
UNLOAD_ALL
IMPORT FILENAME=catalog.gmc \
EXPORT_RASTER FILENAME=outputDirectory\.tif \
TYPE=GEOTIFF SPATIAL_RES=0.5,0.5 GEN_WORLD_FILE=NO \
PALETTE=MULTIBAND NUM_BANDS=3 BAND_BIT_DEPTH=8 \
POLYGON_CROP_FILE=grid.shp \
POLYGON_CROP_USE_EACH=YES POLYGON_CROP_NAME_ATTR=MAP_TILE \
UNLOAD_ALL
What I have tried:
PALETTE=KEEP_SOURCE NUM_BANDS=3
BAND_EXPORT_SETUP...
.. and all the mixtures.
Original:

After: (Which isnt true)

Image:

I need to clip some (IrRG) 3bands Geotiff using a "grid.shp" but I lose the original bands interpretation in the process, and I have tried everything I could... I have attached three screenshots, header (before), header (after), and false color image (IrRG) which is ok after the clip, whitout the proper color interp (Undefinined, Red, Green). Here is my code.
The question is, is there a way to keep the same color interpretation when cropping the files? Thanks for your help.
CODE:
GLOBAL_MAPPER_SCRIPT VERSION="1.00"
UNLOAD_ALL
IMPORT FILENAME=catalog.gmc \
EXPORT_RASTER FILENAME=outputDirectory\.tif \
TYPE=GEOTIFF SPATIAL_RES=0.5,0.5 GEN_WORLD_FILE=NO \
PALETTE=MULTIBAND NUM_BANDS=3 BAND_BIT_DEPTH=8 \
POLYGON_CROP_FILE=grid.shp \
POLYGON_CROP_USE_EACH=YES POLYGON_CROP_NAME_ATTR=MAP_TILE \
UNLOAD_ALL
What I have tried:
PALETTE=KEEP_SOURCE NUM_BANDS=3
BAND_EXPORT_SETUP...
.. and all the mixtures.
Original:

After: (Which isnt true)

Image:

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
- 944 Bug Report
- 563 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
