Global Mapper Pro Coming Soon

script SET_BG_COLOR to white for 4band raster imagery not working

KalikaKalika Global Mapper UserPosts: 3
edited September 2013 in Technical Support
Hi there!

I've got a script which imports 4band tiffs and exports 4band tiffs using a shapefile as an area of interest. All imagery outside the shapefile should have a white background colour, but it is turning out black. This script always works for 3band RGB imagery.

Here is my script:

GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
SET_BG_COLOR COLOR=RGB(255,255,255)
DEFINE_PROJ PROJ_NAME="myProj"
PROJCS["Transverse_Mercator",GEOGCS["GCS_Geographic Coordinate System",DATUM["D_GDA94",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["scale_factor",0.9996],PARAMETER["central_meridian",135],PARAMETER["latitude_of_origin",0],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]
END_DEFINE_PROJ
LOAD_PROJECTION PROJ_NAME="myProj"
IMPORT FILENAME="M:\11063A_Gove\Imagery\Tiffs_Complete\Gove_e690n8639.tif" TYPE=GEOTIFF \
PROJ_NAME="myProj" \
COLOR_GRADE="1.00,0,255,1,254,0,255,1,254,0,255,1,254" \
SAMPLING_METHOD=BILINEAR CONTRAST_MODE=NONE CLIP_COLLAR=NONE BLEND_MODE=NO_BLEND LOAD_FLAGS="0~0~0~4~0~1"
IMPORT FILENAME="M:\11063A_Gove\Imagery\Tiffs_Complete\Gove_e690n8640.tif" TYPE=GEOTIFF \
PROJ_NAME="myProj" \
COLOR_GRADE="1.00,0,255,1,254,0,255,1,254,0,255,1,254" \
SAMPLING_METHOD=BILINEAR CONTRAST_MODE=NONE CLIP_COLLAR=NONE BLEND_MODE=NO_BLEND LOAD_FLAGS="0~0~0~4~0~1"
IMPORT FILENAME="M:\11063A_Gove\Imagery\Tiffs_Complete\Gove_e692n8637.tif" TYPE=GEOTIFF \
PROJ_NAME="myProj" \
COLOR_GRADE="1.00,0,255,1,254,0,255,1,254,0,255,1,254" \
SAMPLING_METHOD=BILINEAR CONTRAST_MODE=NONE CLIP_COLLAR=NONE BLEND_MODE=NO_BLEND LOAD_FLAGS="0~0~0~4~0~1"
IMPORT FILENAME="M:\11063A_Gove\Imagery\Tiffs_Complete\Gove_e692n8639.tif" TYPE=GEOTIFF \
PROJ_NAME="myProj" \
COLOR_GRADE="1.00,0,255,1,254,0,255,1,254,0,255,1,254" \
SAMPLING_METHOD=BILINEAR CONTRAST_MODE=NONE CLIP_COLLAR=NONE BLEND_MODE=NO_BLEND LOAD_FLAGS="0~0~0~4~0~1"
IMPORT FILENAME="M:\11063A_Gove\Imagery\Tiffs_Complete\Gove_e692n8640.tif" TYPE=GEOTIFF \
PROJ_NAME="myProj" \
COLOR_GRADE="1.00,0,255,1,254,0,255,1,254,0,255,1,254" \
SAMPLING_METHOD=BILINEAR CONTRAST_MODE=NONE CLIP_COLLAR=NONE BLEND_MODE=NO_BLEND LOAD_FLAGS="0~0~0~4~0~1"
EXPORT_RASTER FILENAME="M:\11063A_Gove\Imagery\Delivery_Procedures\02_Clipped_Boosted\MGAz53\I5.TIF" TYPE=GEOTIFF \
GLOBAL_BOUNDS_SIZE="690410,8638100,2010,2010" \
POLYGON_CROP_FILE="P:\11063A_Gove(20946A)\Working\AOI\20946A_Gove_Ortho_Area_MGAZ53_Rev0..shp" \
FORCE_SQUARE_PIXELS=YES SPATIAL_RES=0.15,0.15 GEN_WORLD_FILE=YES GEN_PRJ_FILE=YES COMPRESSION=NONE PALETTE=MULTIBAND NUM_BANDS=4 BAND_BIT_DEPTH=8
UNLOAD_ALL

Any help would be greatly appreciated!

Comments

Sign In or Register to comment.