Simplify through scripting

GeoTechGeoTech Global Mapper UserPosts: 2
edited March 2012 in Technical Support
I am trying to Simplify some building vectors in a shape file, and then output the results in a separate file.

I thought it would be a simple script but no features are being updated? The script is below. Any thoughts on where I am going wrong?

GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL


// Loop over all SHAPE files in a folder
DIR_LOOP_START DIRECTORY="C:\GMTEST\" FILENAME_MASKS="*SHP" RECURSE_DIR=NO


// Import the shape files. Global Mapper will automatically
// determine that this is an archived shapefile and load it
// correctly.
IMPORT FILENAME="%FNAME_W_DIR%"


// Simplify all vectors in the loaded shape file.
EDIT_VECTOR COMPARE_STR="CLASS_NAME=BUILDINGS" SIMPLIFICATION=2


// Export the simplified vectors to a new shape file.
EXPORT_VECTOR FILENAME="%DIR%%FNAME_WO_EXT%_SIMPLIFY.SHP" TYPE=SHAPEFILE \
SHAPE_TYPE=AREAS GEN_PRJ_FILE=YES

// Unload the loaded data
UNLOAD_ALL


// End the loop
DIR_LOOP_END

Regards

Comments

Sign In or Register to comment.