Combine Ikonos rgb bands and IR band into a single 4 band image
rfoley
Global Mapper User
Is there a way to combine 4 ikonos images (1 - red band, 2 - green band, 3 - blue band, 4 - IR band) into a single 4 band image?
Comments
-
Yes, in v11 just load the 4 separate images, then use the File->Export Raster->Export GeoTIFF menu command and choose the multi-band export option. You'll be able to choose which band in the export file comes from which bands from which loaded files to create the combined RGBI image.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hello, I know this is an old thread, but is there a way to do this in a batch? We have a couple thousand images to merge into 4-band.
Thanks in advance. -
I managed to make a script to do this. For some reason I had to work backwards with the IF statement (the combine_str didn't recognize the "=" operator) but it works:GLOBAL_MAPPER_SCRIPT VERSION="1.00"UNLOAD_ALLLOG_MESSAGE Script <%SCRIPT_FILENAME%> started at %DATE% %TIME%//Note: RGB and NIR images need to be separated into different folders and need to have the exact same nameLOG_MESSAGE Define Parameter// Define Root Folder of Project ExportDEFINE_VAR NAME="RGB_DIR" PROMPT=DIR ABORT_ON_CANCEL=YES PROMPT_TEXT="RGB Image Directory"DEFINE_VAR NAME="NIR_DIR" PROMPT=DIR ABORT_ON_CANCEL=YES PROMPT_TEXT="NIR Image Directory"DEFINE_VAR NAME="RGBN_DIR" PROMPT=DIR ABORT_ON_CANCEL=YES PROMPT_TEXT="RGBN Output Directory"// Importing ImagesLOG_MESSAGE <%TIME%> Start Importing ImagesIMPORT_DIR_TREE DIRECTORY="%RGB_DIR%" \TYPE="GEOTIFF" LABEL_FIELD_FORCE_OVERWRITE="NO" CLIP_COLLAR="NONE" SAMPLING_METHOD="NEAREST_NEIGHBOR" \AUTO_CONTRAST="NO" CONTRAST_SHARED="YES" CONTRAST_MODE="NONE" TEXTURE_MAP="NO" LAYER_DESC="RGB_IMAGES" LAYER_GROUP="RGB Images"IMPORT_DIR_TREE DIRECTORY="%NIR_DIR%" \TYPE="GEOTIFF" LABEL_FIELD_FORCE_OVERWRITE="NO" CLIP_COLLAR="NONE" SAMPLING_METHOD="NEAREST_NEIGHBOR" \AUTO_CONTRAST="NO" CONTRAST_SHARED="YES" CONTRAST_MODE="NONE" TEXTURE_MAP="NO" LAYER_DESC="NIR_IMAGES" LAYER_GROUP="NIR Images"// Looping through folders and merging bandsLOG_MESSAGE <%TIME%> Merging BandsDIR_LOOP_START DIRECTORY="%RGB_DIR%"DEFINE_VAR NAME="CURRENT_RGB_FNAME" VALUE = "%FNAME%"DEFINE_VAR NAME="CURRENT_RGB_FNAME_W_DIR" VALUE = "%FNAME_W_DIR%"DIR_LOOP_START DIRECTORY="%NIR_DIR%"DEFINE_VAR NAME="CURRENT_NIR_FNAME" VALUE = "%FNAME%"DEFINE_VAR NAME="CURRENT_NIR_FNAME_W_DIR" VALUE = "%FNAME_W_DIR%"IF COMPARE_STR="%CURRENT_RGB_FNAME%!=%CURRENT_NIR_FNAME%"ELSEEXPORT_RASTER FILENAME="%RGBN_DIR%%CURRENT_NIR_FNAME%" TYPE="GEOTIFF" NUM_BANDS=4 PALETTE="MULTIBAND" BAND_BIT_DEPTH=8 \BAND_EXPORT_SETUP="1?1?%CURRENT_RGB_FNAME_W_DIR%" \BAND_EXPORT_SETUP="2?2?%CURRENT_RGB_FNAME_W_DIR%" \BAND_EXPORT_SETUP="3?3?%CURRENT_RGB_FNAME_W_DIR%" \BAND_EXPORT_SETUP="4?1?%CURRENT_NIR_FNAME_W_DIR%"END_IFDIR_LOOP_ENDDIR_LOOP_ENDLOG_MESSAGE Export took %TIME_SINCE_LAST_LOG%UNLOAD_ALL
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website