GENERATE_EQUAL_VAL_AREAS / export vector not working

robinrobin Global Mapper UserPosts: 50Trusted User
edited March 2013 in GM Script Language
Hi,

I wish to run through many TIF tiles and generate valid regions. Testing in the GUI I find 254 (all colours) will split a tif into white and black based on valid/ invalid pixels (Assuming white background=NULL).

But, when I script it I cannot figure why it is not exporting.

I tested the image load with image export function, so that works.

I try changing GENERATE_EQUAL_VAL_AREAS to GENERATE_LAYER_BOUNDS as it is much simpler, but the export does not work.. any hints?

Kind Regards,

Robin
...
DIR_LOOP_START DIRECTORY="".\" FILENAME_MASKS="*.tif" RECURSE_DIR=NO

IMPORT FILENAME="%FNAME_W_DIR%" TYPE="AUTO" AUTO_CONTRAST="NO"

// have no idea if this line works, but does not export! GENERATE_EQUAL_VAL_AREAS FILENAME="%FNAME_W_DIR%" ATTR_NAME="COLOR" COLOR_DIST=254

GENERATE_LAYER_BOUNDS LAYER_DESC="hello"


EXPORT_VECTOR FILENAME="%DIR%%FNAME_WO_EXT%xxx.shp" TYPE="SHAPEFILE"

// this line tested and works, so we conclude the image loads!!! EXPORT_RASTER FILENAME="%DIR%%FNAME_WO_EXT%xxx.tif" TYPE="GEOTIFF"

UNLOAD_ALL
DIR_LOOP_END

Comments

Sign In or Register to comment.