Global Mapper Pro

Contour Script not outputting 3D Shapefiles from script (Works fine loaded inside software)

Good Evening,

This is my first tile putting a Global Mapper script together so I wanted to see if anyone could help me with an issue I am having. The goal of the script is to perform the whole contour generation process and export of 3d shapefiles as a script instead of running directly in the software. I am able to get the script to run fine but the exported contour shapefiles are not 3D when run through the script. If I perform this same process inside the software the exported contour shapefiles will export correctly as 3D. Is there an error in my script? Also am I using "MAX_THREAD_COUNT" correctly? How do you know what processes will use multi core in Global Mapper? 

Script:
GLOBAL_MAPPER_SCRIPT VERSION="1.00"
UNLOAD_ALL
SET_LOG_FILE FILENAME="C:\Temp\script_log.txt" APPEND_TO_FILE=NO
LOG_MESSAGE Script <%SCRIPT_FILENAME%> started at %DATE% %TIME%
IMPORT_DIR_TREE DIRECTORY="C:\temp\Test\1_Meter\" FILENAME_MASKS="*.TIF" \ RECURSE_DIR=NO
LOG_MESSAGE Import took %TIME_SINCE_LAST_LOG%
GENERATE_CONTOURS INTERVAL=0.6 ELEV_UNITS=METERS MULT_MINOR=5 MULT_MAJOR=10 SMOOTH_CONTOURS=YES SIMPLIFICATION=0.1 MIN_CONTOUR_LEN=4 \ MAX_THREAD_COUNT=0
IMPORT FILENAME="C:\temp\Test\1_Meter\Tile_Grid\NC_TileGrid.shp" LABEL_FIELD="USNG"
IMPORT_DIR_TREE DIRECTORY="C:\temp\Test\1_Meter\" FILENAME_MASKS="*.TIF" \ RECURSE_DIR=NO
EXPORT_VECTOR FILENAME="C:\temp\Test\1_Meter\Test_Contours\Contours_.shp" TYPE=SHAPEFILE SHAPE_TYPE=LINES GEN_3D_LINES=YES GEN_PRJ_FILE=YES INC_ELEV_ATTR=YES \ 
POLYGON_CROP_FILE="C:\temp\Test\1_Meter\Tile_Grid\NC_TileGrid.shp" POLYGON_CROP_USE_EACH=YES POLYGON_CROP_NAME_ATTR="<Feature Name>" \ MAX_THREAD_COUNT=0
LOG_MESSAGE Export took %TIME_SINCE_LAST_LOG% 
UNLOAD_ALL
LOG_MESSAGE Total Script Run Time: %TIME_SINCE_START%
PLAY_SOUND FILENAME="c:\windows\media\tada.wav"


Thanks,
Mike

Comments

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello Mike,

    To export 3D lines, use GEN_3D_FEATURES=YES (instead of GEN_3D_LINES). I see that one of the export samples in the documentation uses GEN_3D_LINES, but that is wrong. I will have it fixed.

    The MAX_THREAD_COUNT parameter is used with the SET_OPT command to set a global value that limits the thread count. The default value is 0, which tells Global Mapper to use as many threads as possible for multi-threaded operations. Any operation that is multi-threaded will automatically run that way -- you don't need to specify it on individual commands.

    Cheers,
    Bob
Sign In or Register to comment.