| | Global Mapper 3D GIS Mapping Scripting Language |
Global Mapper script files allow the user to create custom batch processes that make use of the functionality built in to Global Mapper. From a script, one can import data in any of the numerous formats supported by the software, reproject that data if desired, and export it to a new file. 
Contents
TOP General Overview Global Mapper script files consist of a series of command lines. Each command line begins with a command. A series of parameter/value pairs should follow the command. These pairs should be written as parameter=value. No spaces should exist before or after the equal sign. Individual parameter/value pairs should be separated by spaces. If a pair requires spaces internal to the value, quotes may be used around the entire value. For example, for a filename with spaces, the pair could look like FILENAME="c:\\my documents\\test.tif". Command lines typically consist of one line each. To extend a command to another line, use the backslash character (\) at the end of the line. The only exception to this is the DEFINE_PROJ command. It has a slightly different format that is described later. TOP
Batch Mode Operation
You can run a Global Mapper script file automatically be passing it on the command line to the Global Mapper .exe file. The script file will be run with no user interface displayed and Global Mapper will immediately exit when the script file completes processing. This allows you to easily run Global Mapper scripts from another application or from a DOS batch file. TOP
Comments Any lines that being with the forward slash character (/) are considered comments and are ignored by the script processing engine. This means that you can use C or C++ style comments like // or /* at the start of your line. TOP DEFINE_PROJ The DEFINE_PROJ command allows a projection (including datum) to be associated with a name. The projection name can then be used in later IMPORT, IMPORT_ARCHIVE, IMPORT_ASCII, and LOAD_PROJECTION commands to specify a projection as needed. The DEFINE_PROJ command consists of a single command line followed by a series of lines describing the projection in the format of an ESRI PRJ file. The easiest way to determine the text for a projection is to setup a projection on the Projection tab of the Tools->Configuration and then use the Save to File button to create a new .prj file. Then just open the .prj file up in Notepad and copy the contents to the lines following the DEFINE_PROJ command line. The DEFINE_PROJ command is terminated with a single line containing only the text END_DEFINE_PROJ. For a sample of the DEFINE_PROJ command in use, load some data and then save a Global Mapper workspace file from the File->Save Worksapce menu command. Open the resulting .gmw file in an editor and you can see how the DEFINE_PROJ command is used to define a view projection and the set it. The following parameters are required by the DEFINE_PROJ command. - PROJ_NAME - specifies the name to associate with the projection
TOP EMBED_SCRIPT The EMBED_SCRIPT command allows you to call another script from within a script. This can be useful in many situations. For example, if you have a common set of data files that you want to load for each script operation, you could simply create a script that loaded those files, then embed that script within your other scripts. The following parameters are supported by the command: - FILENAME - full path to script file to run
TOP EXPORT_ELEVATION The EXPORT_ELEVATION command exports all currently loaded elevation data to a file. The following parameters are supported by the command. - FILENAME - full path to file to save the data to
- TYPE - type of elevation file we're exporting to
- ARCASCIIGRID - export an Arc ASCII Grid format file.
- DXF_MESH - export a 3D DXF mesh format file.
- DXF_POINT - export a 3D DXF point format file.
- FLOATGRID - export a Float/Grid format file.
- GEOTIFF - export to a GeoTIFF format file.
- LEVELLER_HF - export to a Leveller heightfield file.
- MAPMAKERTERRAIN - export to a MapMaker Terrain format file.
- ROCKWORKS_GRID - export to a RockWorks Grid format file.
- SURFERGRID - export to a Surfer Grid format file. The FORMAT parameter specifies whether it is an ASCII or binary format Surfer Grid file.
- TERRAGEN - export to a Terragen terrain file.
- USGS_DEM - export to a native format USGS DEM file.
- VRML - export to a VRML file.
- XYZ_GRID - export to a XYZ Grid file.
- ELEV_UNITS - specify elevation units to use in export
- FEET - export in US feet
- DECIFEET - export in 10ths of US feet
- METERS - export in meters
- DECIMETERS - export in 10ths of meters
- CENTIMETERS - export in centimeters
- SPATIAL_RES - specifies spatial resolution. Defaults to the minimum spatial resolution of all loaded data if not specified. Should be formatted as x_resolution,y_resolution. The units are the units of the current global projection. For example, if UTM was the current global projection and you wanted to export at 30 meter spacing, the parameter/value pair would look like SPATIAL_RES=30.0,30.0.
- GLOBAL_BOUNDS - specifies the export bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, maximum x, maximum y.
- GLOBAL_BOUNDS_SIZE - specifies the export bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, width in x, width in y.
- LAT_LON_BOUNDS - specifies the export bounds in latitude/longitude degrees. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of westmost longitude, southernmost latitude, easternmost longitude, northernmost latitude.
- FORMAT (SURFERGRID only) - determines if Surfer Grid export format is ASCII or BINARY.
- GEN_WORLD_FILE (GEOTIFF only) - specifies that a TIFF world file (TFW) should be generated in addition to the TIFF file. Use GEN_WORLD_FILE=YES to turn on.
- GEN_TAB_FILE (GEOTIFF only) - specifies that a MapInfo TAB file should be generated in addition to the GeoTIFF file. Use GEN_TAB_FILE=YES to turn on.
- QUAD_NAME (USGS_DEM only) - specifies the quad name to place in the header of the USGS DEM file.
- FILL_GAPS - specifies that small gaps in between and within the data sets being exported will be filled in by interpolating the surrounding data to come up with an elevation for the point in question. This option is on by default, specify FILL_GAPS=NO to turn off.
- VERT_EXAG (VRML only) - specifies the vertical exaggeration to use when creating the VRML file. Larger values result in a rougher terrain being generated while smaller values result in a smoother terrain. The valid range of values is 0 to 20, with 10 being the default.
- COORD_DELIM (XYZ_GRID only) - specifies the delimeter between coordinates
- COMMA - coordinates are separated by commas
- FIXED_WIDTH - coordinates are stored in fixed width columns
- SEMICOLON - coordinates are separated by semicolons
- SPACE - coordinates are separated by space characters
- TAB - coordinates are separated by tab characters
TOP
EXPORT_RASTER The EXPORT_RASTER command exports all currently loaded raster and elevation data to a file. The following parameters are supported by the command. - FILENAME - full path to file to save the data to
- TYPE - type of raster file we're exporting to
- GEOTIFF - export to a GeoTIFF format file.
- JPEG - export to a JPG format file.
- SPATIAL_RES - specifies spatial resolution. Defaults to the minimum spatial resolution of all loaded data if not specified. Should be formatted as x_resolution,y_resolution. The units are the units of the current global projection. For example, if UTM was the current global projection and you wanted to export at 30 meter spacing, the parameter/value pair would look like SPATIAL_RES=30.0,30.0.
- GLOBAL_BOUNDS - specifies the export bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, maximum x, maximum y.
- GLOBAL_BOUNDS_SIZE - specifies the export bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, width in x, width in y.
- LAT_LON_BOUNDS - specifies the export bounds in latitude/longitude degrees. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of westmost longitude, southernmost latitude, easternmost longitude, northernmost latitude.
- GEN_WORLD_FILE - specifies that a world file should be generated in addition to the image file. Use GEN_WORLD_FILE=YES to turn on.
- GEN_TAB_FILE (GEOTIFF only) - specifies that a MapInfo TAB file should be generated in addition to the GeoTIFF file. Use GEN_TAB_FILE=YES to turn on.
- GEN_PRJ_FILE (JPG only) - specifies that a projection (PRJ) file should be generated in addition to the JPG file. Use GEN_PRJ_FILE=YES to turn on.
- PALETTE - specifies the palette to use. If not specified, a 24-bit RGB image will be generated.
- OPTIMIZED (GEOTIFF only) - The palette generated will be an optimal mix of up to 256 colors that will closely represent the full blend of colors in the source images. This option will generate the best results, but can more than double the export time required if any high color images are present in the export set.
- HALFTONE (GEOTIFF only) - use a 256-color halftone palette spread over the color spectrum
- DOQ_DRG (GEOTIFF only) - use a 256-color palette optimized for combined grayscale DOQs and USGS DRGs
- DRG (GEOTIFF only) - use a 256-color palette optimized for the colors found in USGS DRGs
- GRAYSCALE - use a 256-color grayscale palette
- BW (GEOTIFF only) - creates a black and white, 1-bit per pixel image
- QUALITY (JPEG only) - specifies the quality setting to use when generating the JPG image. Valid values range from 1 to 100, with 1 generating the lowest quality image and 100 generating the highest quality image. If no QUALITY setting is present, a default value of 75 is used which generates a very high quality image that is still highly compressed.
TOP EXPORT_VECTOR The EXPORT_VECTOR command exports all currently loaded vector data to a file. The following parameters are supported by the command. - FILENAME - full path to file to save the data to
- TYPE - type of vector file we're exporting to
- DLGO - export to a native format USGS DLG-O file.
- DXF - export to an AutoCAD DXF format file.
- LANDMARK_GRAPHICS - export to a Landmark Graphics format file.
- MAPGEN - export to a MapGen format file.
- MAPINFO - export to a MapInfo MIF/MID format file.
- MATLAB - export to a MatLab format file.
- NIMA_ASC - export to a NIMA ASC format file.
- SHAPEFILE - export to an ESRI Shapefile format file.
- SIMPLE_ASCII - export to a simple ASCII text file.
- SURFER_BLN - export to a Surfer BLN format file.
- SVG - export to a Scalable Vector Graphic (SVG) format file.
- TSUNAMI_OVR - export to a Tsunami OVR format file.
- GLOBAL_BOUNDS - specifies the export bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, maximum x, maximum y.
- GLOBAL_BOUNDS_SIZE - specifies the export bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, width in x, width in y.
- LAT_LON_BOUNDS - specifies the export bounds in latitude/longitude degrees. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of westmost longitude, southernmost latitude, easternmost longitude, northernmost latitude.
- QUAD_NAME (DLGO only) - specifies the quadrangle name to store in the header of the DLG-O file. If not quadrangle name is specified, Global Mapper will attempt to automatically determine one based on the loaded data.
- EXPORT_DXF_LABELS (DXF only) - specifies that object labels will be exported as attributes in the DXF file. Typically you want to set this to YES, unless you are working with a software package that cannot handle DXF files with attributes. Leaving out this parameter or setting it to anything but YES will cause feature labels to be discarded on export.
- SHAPE_TYPE (SHAPEFILE only) - specifies the vector object type (area, line, or point) to export to the shapefile. The following values are valid:
- AREAS - export area features to the Shapefile
- LINES - export line features to the Shapefile
- POINTS - export point features to the Shapefile
- GEN_PRJ_FILE (DXF and SHAPEFILE only) - specifies that a projection (PRJ) file should be generated in addition to the output file. Set this to YES to cause the projection file to be generated. Leaving out this parameter or setting it to anything but YES will cause no PRJ file to be generated.
- GEN_3D_FEATURES (SHAPEFILE only) - specifies that 3D line and point objects should be created in the shapefile. Set this to YES to cause the the 3D line or point objects to be generated. Leaving out this parameter or setting it to anything but YES results in the normal 2D line objects. The elevation stored for each vertex/point will be the first of the following that is available:
- The elevation associated with the vertex/point in question.
- The elevation associated with the entire line/point being exported. For example, the elevation of a contour line or spot elevation.
- The first elevation obtained by searching the loaded elevation layers at the position of the vertex/point.
A value of 0.0 will be used if no elevation could be obtained via any of the prior methods. - COORD_DELIM (SIMPLE_ASCII only) - specifies the delimeter between coordinates in coordinate lines
- COMMA - coordinates are separated by commas
- SEMICOLON - coordinates are separated by semicolons
- SPACE - coordinates are separated by space characters
- TAB - coordinates are separated by tab characters
- FEATURE_SEP (SIMPLE_ASCII only) - specifies whether or not to separate vector features with a blank line
- NONE - do not separate vector features
- BLANK_LINE - separate vector features with a blank line
- EXPORT_ELEV (SIMPLE_ASCII only) - specifies whether or not a elevation value should be generated for each vertex. A value of EXPORT_ELEV=YES will cause elevations to be generated. If the option is not specified, elevation values will be generated.
- EXPORT_ATTRS (SIMPLE_ASCII only) - specifies whether or not feature attributes should be written to the text file just before the coordinates. Use EXPORT_ATTRS=YES to enable export of the feature attributes. If the option is not specified, attributes will be exported.
TOP GENERATE_CONTOURS The GENERATE_CONTOURS command allows for the generation of contour lines (isolines of equal elevation) from any or all currently loaded elevation data. The following parameters are supported by the command. - ELEV_UNITS - specify elevation units to use in export
- FEET - export in US feet
- METERS - export in meters
- INTERVAL - specifies the contour interval to use. This must be a whole number greater than 0. The units are specified with the ELEV_UNITS parameter described above. If you wanted to generate a contour file with an interval of 20 feet, you would use INTERVAL=20 ELEV_UNITS=FEET in the parameter list. If no interval is provided, a default one is guessed based on the elevation range of the loaded elevation data.
- SPATIAL_RES - specifies spacing of grid points used to determine contour position. A smaller grid spacing results in higher fidelity, but larger, contours. Typically you'll want to use the default value which is the minimum spatial resolution of all loaded data. Should be formatted as x_resolution,y_resolution. The units are the units of the current global projection. For example, if UTM was the current global projection and you wanted to use a grid with a 30 meter spacing, the parameter/value pair would look like SPATIAL_RES=30.0,30.0.
- GLOBAL_BOUNDS - specifies the contour bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, maximum x, maximum y.
- GLOBAL_BOUNDS_SIZE - specifies the contour bounds in units of the current global projection. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of minimum x, minimum y, width in x, width in y.
- LAT_LON_BOUNDS - specifies the contour bounds in latitude/longitude degrees. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of westmost longitude, southernmost latitude, easternmost longitude, northernmost latitude.
TOP GENERATE_PATH_PROFILE
The GENERATE_PATH_PROFILE command allows for the saving of a 3D path profile to an ASCII XYZ file. This command uses loaded elevation data to generate a list of the 3D coordinates between two given points in the given elevation units. The following parameters are supported by the command. - FILENAME - full path to XYZ ASCII file to save the data to
- ELEV_UNITS - specify elevation units to use in export
- FEET - export in US feet
- METERS - export in meters
- POINT_COUNT - specifies the number of points to generate in the path. This must be at least two. For example, to create 1000 points, use POINT_COUNT=1000.
- START_POS - specifies the start position for the path profile. The coordinates must be given in the current global coordinate system. For example, if UTM if the current projection, you might specify and easting/northing as follows: START_POS=480000,4310000.
- END_POS - specifies the end position for the path profile. The coordinates must be given in the current global coordinate system. For example, if UTM if the current projection, you might specify and easting/northing as follows: START_POS=480000,4310000.
- ADD_LAND_USE_CODES - specifies whether to query loaded LULC data sets for the land use code at each point and to include that land use code after the elevation. Use ADD_LAND_USE_CODES=YES to turn on adding land use codes for each point.
TOP GLOBAL_MAPPER_SCRIPT The GLOBAL_MAPPER_SCRIPT must be the first command in the file. The only parameter supported is the VERSION parameter. Currently, the entire command line should look like: GLOBAL_MAPPER_SCRIPT VERSION=1.00 TOP IMPORT The IMPORT command imports a data file for later use. The following parameters are supported by the command. - FILENAME - full path to file to load the data from
- TYPE - type of data file we're loading
- AUTO - automatically determine the type (default)
- ACE - Altimetry Corrected Elevation (ACE) format file.
- ARCASCIIGRID - Arc ASCII Grid format file.
- ARCBINARYGRID - Arc Binary Grid format file.
- BIL - BIL format file.
- BSB - BSB format file (usually has .KAP extension).
- CANADA3D - Canada 3D format file.
- CTM_DEM - a CTM DEM format file.
- DLGO - USGS DLG-O
- DGN - MicroStation DGN files earlier than v8.
- DOQQ - USGS DOQ in JPEG format.
- DTED - Digital Terrain Elevation Data (DTED) format.
- DXF - DXF format.
- ECW - ER Mapper Compressed Wavelet (ECW) format.
- ENVI DEM - ENVI DEM format file.
- ERDAS - Erdas Imagine format file.
- ETOPO2 - ETOPO2 format file.
- FLOATGRID - FLOAT/GRID format file.
- GEOTIFF - GeoTIFF format file.
- GNIS - Geographics Names Information Service (GNIS) file
- GXF - Geosoft Grid ASCII (GXF) file
- HELAVA_DEM - a Helava DEM file
- IBCAO - Arctic bathymetry in NetCDF format.
- JPEG - a JPEG file with an associated world file.
- LULC - USGS Land Use and Land Cover vector data file.
- MAPINFO - a MapInfo MIF/MID of TAB/MAP vector data collection.
- MAPMAKERTERRAIN - a MapMaker terrain file
- MICRODEM_DEM - a MicroDEM-created DEM file
- MICROPATH_DEM - a Micropath DEM file
- MRSID - a LizardTech MrSID image file.
- NetCDF - a NetCDF format file.
- NIMA_GNS - a NIMA GNS format file.
- ROCKWORKS_GRID - a RockWorks Grid format file.
- SDTS - a SDTS transfer
- SHAPEFILE - an ESRI Shapefile.
- SURFERGRID - a Surfer grid format file.
- SWEDISHDEMGRID - a Swedish DEM grid format file.
- TIGER_LINE - a Tiger/Line format file.
- USGS_DEM - a native format USGS DEM file.
- HIDDEN - set to YES to cause this overlay to be hidden from view after it is loaded. The default is to show the overlay.
- ANTI_ALIAS (elevation and raster only) - specifies whether to remove jagged edges by making a subtle transition between pixels. Turning off this option helps maintain the hard edges of the pixels as they are rasterized. Use ANTI_ALIAS=YES to turn on. Anything else turns it off.
- AUTO_CONTRAST (raster only) - specifies whether to automatically calculate and apply a 2 standard deviation contrast adjustment to the image. Use AUTO_CONTRAST=YES to turn on. Anything else turns it off.
- CLIP_COLLAR (raster only) - specifies whether to automatically clip the collar off of the image. Use in conjunction with the CLIP_COLLAR_BOUNDS parameter described below to clip the collar off of images. Use CLIP_COLLAR=YES to turn on. Anything else turns it off.
- CLIP_COLLAR_BOUNDS (raster only) - specifies the lat/lon bounds of the collar to be clipped off when the CLIP_COLLAR parameter is enabled. The coordinates should be specified in arc degrees as a comma-delimited list going west,south,east,north. For example, CLIP_COLLAR_BOUNDS=34.25,-109.0,34.375,-108.875. Leaving out this parameter will cause the default collar boundary to be used.
- COLOR_INTENSITY (elevation and raster only) - specifies the color intensity to use when adjusting the brightness of pixels in the overlay. Valid values range from 0 to 20, with 0 being completely black, 10 being no alteration, and 20 being completely white. For example, to make an image slightly darker, you could use COLOR_INTENSITY=7.
- TEXTURE_MAP (raster only) - specifies that this image should be draped over any elevation data loaded before it. Use TEXTURE_MAP=YES to turn on. Anything else turns it off.
- TRANSPARENT_COLOR (elevation and raster only) - specifies the color to make transparent when rendering this overlay. The color should be specified as RGB(<red>,<green>,<blue>). For example, to make white the transparent color, use TRANSPARENT_COLOR=RGB(255,255,255). If you do not wish any color to be transparent, do not use this parameter.
- PROJ_NAME - specifies the name of the projection to use for this file (this will override any projection information stored in the file). This name must have been defined with a prior DEFINE_PROJ command.
- PROJ_FILENAME - specifies the name of the projection (.prj) file to use for this file (this will override any projection information stored in the file).
- ELEV_UNITS (elevation only) - specify elevation units to use for this file if it contains gridded elevation data
- FEET - export in US feet
- DECIFEET - export in 10ths of US feet
- METERS - export in meters
- DECIMETERS - export in 10ths of meters
- CENTIMETERS - export in centimeters
- ELEV_OFFSET (elevation only) - specifies the offset in meters to apply to each elevation value in the layer. This allows you to vertically shift a layer to match other layers.
- MIN_ELEV (elevation only) - specifies the minimum elevation (meters) to treat as valid when rendering this layer. Any elevations below this value will be treated as invalid and not be drawn or exported.
- MAX_ELEV (elevation only) - specifies the maximum elevation (meters) to treat as valid when rendering this layer. Any elevations above this value will be treated as invalid and not be drawn or exported.
- VOID_ELEV (elevation only) - specified the elevation (meters) to replace any void areas in the layer with. If not specified, the void areas will be transparent.
- TRANSLUCENCY (elevation and raster only) - specifies the level of translucency (i.e. how "see-through" the layer is). Value values range from 0 to 512, with 0 meaning the layer is completely transparent (i.e. invisible) and 512 meaning the layer is completely opaque (this is the default).
- BLEND_MODE (elevation and raster only)- specify blend mode to use for combining this overlay and any previously loaded overlays
- NO_BLEND - no blending is done, this is the default
- MULTIPLE
- SCREEN
- OVERLAY
- HARD_LIGHT
- COLOR_BURN
- COLOR_DODGE
- DARKEN
- LIGHTEN
- DIFFERENCE
- EXCLUSION
- APPLY_COLOR
- APPLY_COLOR_REVERSE
- LABEL_FIELD (Shapefile only) - specifies the name of the attribute field from the DBF file associated with the Shapefile to use as the label attribute for the feature.
- AREA_TYPE (Shapefile only) - specifies the name of the Global Mapper type to use for areas in the Shapefile
- LINE_TYPE (Shapefile only) - specifies the name of the Global Mapper type to use for lines in the Shapefile
- POINT_TYPE (Shapefile only) - specifies the name of the Global Mapper type to use for points in the Shapefile
TOP IMPORT_ARCHIVE The IMPORT_ARCHIVE command imports a data file from a .tar.gz archive for later use. The only time you should ever need to use the IMPORT_ARCHIVE command is when you only want to load some of the data inside a .tar.gz archive. For the typical case of just loading everything in an archive, use the IMPORT command with AUTO as the value for the TYPE parameter. The following parameters are supported by the command. - ARCHIVE_FILENAME - full path to the archive file to load the data from
- FILENAME - full path to file to load the data from
- TYPE - type of data file we're loading
- AUTO - automatically determine the type (default)
- See the documentation for the IMPORT command for the names of the other file types.
- HIDDEN - set to YES to cause this overlay to be hidden from view after it is loaded. The default is to show the overlay.
- ANTI_ALIAS (elevation and raster only) - specifies whether to remove jagged edges by making a subtle transition between pixels. Turning off this option helps maintain the hard edges of the pixels as they are rasterized. Use ANTI_ALIAS=YES to turn on. Anything else turns it off.
- AUTO_CONTRAST (raster only) - specifies whether to automatically calculate and apply a 2 standard deviation contrast adjustment to the image. Use AUTO_CONTRAST=YES to turn on. Anything else turns it off.
- CLIP_COLLAR (raster only) - specifies whether to automatically clip the collar off of the image. Use in conjunction with the CLIP_COLLAR_BOUNDS parameter described below to clip the collar off of images. Use CLIP_COLLAR=YES to turn on. Anything else turns it off.
- CLIP_COLLAR_BOUNDS (raster only) - specifies the lat/lon bounds of the collar to be clipped off when the CLIP_COLLAR parameter is enabled. The coordinates should be specified in arc degrees as a comma-delimited list going west,south,east,north. For example, CLIP_COLLAR_BOUNDS=34.25,-109.0,34.375,-108.875. Leaving out this parameter will cause the default collar boundary to be used.
- COLOR_INTENSITY (elevation and raster only) - specifies the color intensity to use when adjusting the brightness of pixels in the overlay. Valid values range from 0 to 20, with 0 being completely black, 10 being no alteration, and 20 being completely white. For example, to make an image slightly darker, you could use COLOR_INTENSITY=7.
- TEXTURE_MAP (raster only) - specifies that this image should be draped over any elevation data loaded before it. Use TEXTURE_MAP=YES to turn on. Anything else turns it off.
- TRANSPARENT_COLOR (elevation and raster only) - specifies the color to make transparent when rendering this overlay. The color should be specified as RGB(<red>,<green>,<blue>). For example, to make white the transparent color, use TRANSPARENT_COLOR=RGB(255,255,255). If you do not wish any color to be transparent, do not use this parameter.
- PROJ_NAME - specifies the name of the projection to use for this file (this will override any projection information stored in the file). This name must have been defined with a prior DEFINE_PROJ command.
- PROJ_FILENAME - specifies the name of the projection (.prj) file to use for this file (this will override any projection information stored in the file).
- ELEV_UNITS (elevation only) - specify elevation units to use for this file if it contains gridded elevation data
- FEET - export in US feet
- DECIFEET - export in 10ths of US feet
- METERS - export in meters
- DECIMETERS - export in 10ths of meters
- CENTIMETERS - export in centimeters
- ELEV_OFFSET (elevation only) - specifies the offset in meters to apply to each elevation value in the layer. This allows you to vertically shift a layer to match other layers.
- MIN_ELEV (elevation only) - specifies the minimum elevation (meters) to treat as valid when rendering this layer. Any elevations below this value will be treated as invalid and not be drawn or exported.
- MAX_ELEV (elevation only) - specifies the maximum elevation (meters) to treat as valid when rendering this layer. Any elevations above this value will be treated as invalid and not be drawn or exported.
- VOID_ELEV (elevation only) - specified the elevation (meters) to replace any void areas in the layer with. If not specified, the void areas will be transparent.
- TRANSLUCENCY (elevation and raster only) - specifies the level of translucency (i.e. how "see-through" the layer is). Value values range from 0 to 512, with 0 meaning the layer is completely transparent (i.e. invisible) and 512 meaning the layer is completely opaque (this is the default).
- BLEND_MODE (elevation and raster only)- specify blend mode to use for combining this overlay and any previously loaded overlays
- NO_BLEND - no blending is done, this is the default
- MULTIPLE
- SCREEN
- OVERLAY
- HARD_LIGHT
- COLOR_BURN
- COLOR_DODGE
- DARKEN
- LIGHTEN
- DIFFERENCE
- EXCLUSION
- APPLY_COLOR
- APPLY_COLOR_REVERSE
- LABEL_FIELD (Shapefile only) - specifies the name of the attribute field from the DBF file associated with the Shapefile to use as the label attribute for the feature.
- AREA_TYPE (Shapefile only) - specifies the name of the Global Mapper type to use for areas in the Shapefile
- LINE_TYPE (Shapefile only) - specifies the name of the Global Mapper type to use for lines in the Shapefile
- POINT_TYPE (Shapefile only) - specifies the name of the Global Mapper type to use for points in the Shapefile
TOP IMPORT_ASCII The IMPORT_ASCII command imports data from a generic ASCII text file for later use. The following parameters are supported by the command. - FILENAME - full path to file to load the data from
- TYPE - type of import that we're doing
- POINT_ONLY - all lines with coordinate data will result in a new point object begin created
- POINT_AND_LINE - both point and line features will be created from coordinate data in the file. Line features will be created when coordinate data lines are back to back in the file. All individual coordinate lines will result in a point object being created
- ELEVATION - all lines in the file with 3 coordinate values (x,y, and elevation) will be used to create an elevation grid. The data will be triangulated and gridded automatically, resulting in a fully usable elevation grid that can be exported to any of the supported elevation data formats.
- COORD_DELIM - specifies the delimeter between coordinates in coordinate lines
- AUTO - automatically detect the delimeter type (default)
- WHITESPACE - coordinates are separated with one or more space and/or tab characters
- COMMA - coordinates are separated by commas
- SEMICOLON - coordinates are separated by semicolons
- COORD_ORDER specifies the order of the coordinates in coordinate lines
- X_FIRST - x coordinates (i.e. easting or longitude) come first, followed by y coordinates (i.e. northing or latitude) (default)
- Y_FIRST - y coordinates (i.e. northing or latitude) come first, followed by x coordinates (i.e. easting or longitude)
- COORD_PREFIX - if present, this line is used to specify what special character sequence coordinate lines start with. For example, if the coordinate lines in the file started with the character sequence "XY,", you should use COORD_PREF="XY,". By default no coordinate prefix is assumed.
- INCLUDE_COORD_LINE_ATTRS - set the value of this parameter to YES if you wish to use any leftover text at the end of coordinate lines as attributes for the feature the coordinates are in. This could be useful if elevation data is present at the end of the lines. By default, the value of this attribute is NO.
- PROJ_NAME - specifies the name of the projection to use for this file (this will override any projection information stored in the file). This name must have been defined with a prior DEFINE_PROJ command.
- PROJ_FILENAME - specifies the name of the projection (.prj) file to use for this file (this will override any projection information stored in the file).
- ELEV_UNITS - specify elevation units to use for this file if it contains gridded elevation data
- FEET - export in US feet
- DECIFEET - export in 10ths of US feet
- METERS - export in meters
- DECIMETERS - export in 10ths of meters
- CENTIMETERS - export in centimeters
- SKIP_COLUMNS - specifies the number of columns to skip at the start of a coordinate line before trying to read the coordinates. For example, if the X and Y coordinates of a line were in the 3rd and 4th columns of the coordinate line, you'd use a value of SKIP_COLUMNS=2. The default value is 0, meaning that coordinates must be in the first two columns.
- COORD_OFFSET - specifies the offset to apply to any coordinates read in from the file. This offset will be added to each coordinate read in from the file. The offset should be specified as a comma-delimited list of the X, Y, and Z offsets, such as COORD_OFFSET=100000.0,200000.0,0.0
- COORD_SCALE - specifies the scale factort to apply to any coordinates read in from the file. Each coordinate will be multiplied by these scale factor after being read in from the file. The scale factors should be specified as a comma-delimited list of the X, Y, and Z scale factors, such as COORD_SCALE=0.1,0.1,1.0
- NO_DATA_DIST_MULT - specifies how far from an actual data point a grid cell has to be before it is treated as a no data value. This number is given as a multiple of the diagonal size of a single grid cell as nominally determined by the gridding algorithm. A value of 0 means that all points should be considered as valid.
- AREA_TYPE - specifies the name of the Global Mapper type to use for area features imported from the file.
- LINE_TYPE - specifies the name of the Global Mapper type to use for line features imported from the file.
- POINT_TYPE - specifies the name of the Global Mapper type to use for point features imported from the file.
- HIDDEN - set to YES to cause this overlay to be hidden from view after it is loaded. The default is to show the overlay.
SAMPLE: IMPORT_ASCII FILENAME="C:\data\ASCII Files\usvi_landmark.asc" TYPE=POINT_AND_LINE COORD_DELIM=AUTO COORD_ORDER=X_FIRST COORD_PREFIX="XY," INC_COORD_LINE_ATTRS=NO TOP LOAD_PROJECTION The LOAD_PROJECTION command imports a projection from a PRJ file and makes it the current global projection. This projection will be used for all exports after this command until another LOAD_PROJECTION command is encountered to change the global projection. The following parameters are spported by the command. - FILENAME - full path to PRJ file to load the projection from
- PROJ_NAME - specifies the name of the projection to use. This name must have been defined with a prior DEFINE_PROJ command.
TOP SAVE_PROJECTION The SAVE_PROJECTION command saves the current global projection to a PRJ file. The following parameters are supported by the command. - FILENAME - full path to PRJ file to save the projection to
TOP SET_BG_COLOR The SET_BG_COLOR command sets the color to use for any background pixels when rendering layers. The following parameters are supported by the command. TOP SET_LOG_FILE The SET_LOG_FILE command sets the name of the file to log status, warning, and error messages to. If the log file specified already exists, the messages will be appended to the end of it. The following parameters are supported by the command. - FILENAME - full path to log file to write messages to
TOP SET_VERT_DISP_OPTS The SET_VERT_DISP_OPTS command allows you to modify the options used when rendering elevation layers, such as the shader to use, if any, as well as the lighting and water setup. The following parameters are supported by this command: - ENABLE_HILL_SHADING - this setting controls whether or not hill shading (i.e. lighting, shadowing) will be done. Use YES to enable hill shading, and NO to disable hill shading.
- SHADER_NAME - this sets the name of the shader to use when rendering elevation data. This must be one of the names displayed in the shader drop down in Global Mapper, such as "Atlas Shader" or "Global Shader" or the name of a custom shader.
- AMBIENT_LIGHT_LEVEL - this sets the ambient lighting level. The valid range of values is [0.0, 1.0], with smaller numbers meaning completely black (i.e. no light) and 1.0 being full lighting.
- VERT_EXAG - this sets the vertical exaggeration to use when rendering elevation overlays. This effects the hill shading. The valid range of values is (0.0, 10.0].
- LIGHT_ALTITUDE - this sets the altitude angle of the light source that creates shadows on elevation data. The valid range of values is [0.0, 90.0], with 0.0 meaning a light source at the horizon and 90.0 meaning a light source directly overhead.
- LIGHT_AZIMUTH - this sets the direction angle of the light source that creates shadows on elevation data. The valid range of values is [0.0, 360.0), with 0.0 meaning a light source from the top of the screen (i.e. north), 90.0 meaning from the right (i.e. east), etc.
- ENABLE_WATER - this setting controls whether or not water will be displayed on top of elevation values at or below the currently configured water level. Use YES to enable water display, and NO to disable water display.
- WATER_COLOR - this setting controls the color that water drawn on top of elevation data is rendered in. The format of this value is RGB(<red>,<green>,<blue>). For example, to use a water color of blue, use WATER_COLOR=RGB(0,0,255).
- WATER_LEVEL - this setting specifies the height (in meters) below which water should be displayed if enabled.
- WATER_ALPHA - this setting controls how "see through" the water is when displayed. The valid range of values is [0,255], with 0 meaning the water is completely "see through", i.e. invisible, and 255 meaning that the water color is completely opaque such that you can't see any of the shaded relief below it.
TOP UNLOAD_ALL The UNLOAD_ALL command unloads all currently loaded data. This command takes no parameters. TOP UNLOAD_LAYER The UNLOAD_LAYER command allows you to unload all previous loaded layers with a given filename. This is useful if you don't want to unload all previously loaded layers just to get rid of a few of them. The following parameters are supported by the command: - FILENAME - filename of the layer to unload
TOP Crop, Merge, and Reproject 4 USGS DRGs into new GeoTIFF and JPEG files GLOBAL_MAPPER_SCRIPT VERSION=1.00 UNLOAD_ALL
// Import the four 24K DRGs that we want to merge. We use the CLIP_COLLAR option // to indicate that we want the collar to be automatically removed from the // DRGs when they are imported. IMPORT FILENAME="C:\DATA\DRG\KANSAS CITY\O39094B2.TIF" \ TYPE=AUTO ANTI_ALIAS=NO AUTO_CONTRAST=NO CLIP_COLLAR=YES TEXTURE_MAP=NO IMPORT FILENAME="C:\DATA\DRG\KANSAS CITY\O39094A1.TIF" \ TYPE=AUTO ANTI_ALIAS=NO AUTO_CONTRAST=NO CLIP_COLLAR=YES TEXTURE_MAP=NO IMPORT FILENAME="C:\DATA\DRG\KANSAS CITY\O39094A2.TIF" \ TYPE=AUTO ANTI_ALIAS=NO AUTO_CONTRAST=NO CLIP_COLLAR=YES TEXTURE_MAP=NO IMPORT FILENAME="C:\DATA\DRG\KANSAS CITY\O39094B1.TIF" \ TYPE=AUTO ANTI_ALIAS=NO AUTO_CONTRAST=NO CLIP_COLLAR=YES TEXTURE_MAP=NO
// Load a projection file to set the global projection to geographic (lat/lon) // arc degrees with a datum of NAD83. LOAD_PROJECTION FILENAME="C:\DATA\PRJ Files\geo_degrees_nad83.prj"
// Use the EXPORT_RASTER command to generate a new 8-bit per pixel GeoTIFF file EXPORT_RASTER FILENAME="C:\DATA\EXPORTED DATA\merged_drg_8bpp.tif" \ TYPE=GEOTIFF PALETTE=OPTIMIZED
// Now, use the EXPORT_RASTER command to generate a grayscale GeoTIFF file. Lets // also create a world file for this one EXPORT_RASTER FILENAME="C:\DATA\EXPORTED DATA\merged_drg_gray.tif" \ TYPE=GEOTIFF PALETTE=GRAYSCALE GEN_WORLD_FILE=YES
// Create a JPEG file using the EXPORT_RASTER command. Also create a world file // and a projection file to make it easier to load in other places. EXPORT_RASTER FILENAME="C:\DATA\EXPORTED DATA\merged_drg.jpg" \ TYPE=JPEG GEN_WORLD_FILE=YES GEN_PRJ_FILE=YES TOP Generate Contours from a USGS DEM and Export them to DXF and Shape files GLOBAL_MAPPER_SCRIPT VERSION=1.00 UNLOAD_ALL
// Import an archived SDTS DEM file. Global Mapper will automatically // determine that this is an archived SDTS DEM file and load it // correctly. IMPORT FILENAME="C:\DATA\SDTS_DEM\24K\RED ROCK CANYON, CO - 30M.DEM.SDTS.TAR.GZ" ANTI_ALIAS=YES
// Generate 50 ft contours from the loaded DEM data. GENERATE_CONTOURS INTERVAL=50 ELEV_UNITS=FEET
// Export the contours to a new DXF file. The created file will have // 3D polyline features for the contours. EXPORT_VECTOR FILENAME="C:\DATA\EXPORTED DATA\CONTOURS.DXF" TYPE=DXF GEN_PRJ_FILE=YES
// Export the contours to a 3D shape file. EXPORT_VECTOR FILENAME="C:\DATA\EXPORTED DATA\CONTOURS.SHP" TYPE=SHAPEFILE \ SHAPE_TYPE=LINES GEN_3D_LINES=YES GEN_PRJ_FILE=YES TOP 
|