EDIT_MAP_CATALOG
The EDIT_MAP_CATALOG command allows you to work with map catalogs (managed collections of map files), including create new map catalogs, adding maps to existing map catalogs, and removing maps from existing map catalogs.
The following parameters are supported by the command:
- FILENAME - filename of the map catalog to create/update.
- CREATE_IF_EMPTY - specifies whether or not the map catalog (.gmc) file should be created if it doesn't already exist. The default is YES. If you specify the FILENAME of a map catalog file that doesn't exist and have CREATE_IS_EMPTY=NO provided, nothing will be done and an error will be logged.
- ZOOM_DISPLAY - specifies when the maps in the map catalog should be displayed and when it should be hidden based on the display zoom scale. This command will be formatted as a name from the list, below followed by 2 numeric parameters. For example, use ZOOM_DISPLAY="SCALE,25000,0" to have a map display only when zoomed in below 1:25000 scale.
- ALWAYS - always display the map. The numeric parameters are ignored.
- PERCENT - display the map when the map bounding box is a certain percentage of the screen size. For example, use ZOOM_DISPLAY="PERCENT,0.10,0" to display the map when its bounding box is at least 10% of the screen size.
- PIXEL_SIZE - display the map when each display pixel is less than some number of meters in size. For example, use PIXEL_SIZE="SCALE,10,0" to display the map when the current display resolution is 10 meters per pixel (or less/higher resolution).
- SCALE - display the map when the current display is at or below a certain scale. For example, use ZOOM_DISPLAY="SCALE,25000,0" to display the map when the current draw scale is at or below 1:25000.
- SCALE_RANGE - display the map when the current display is below a range of scale value. For example, use ZOOM_DISPLAY="SCALE_RANGE,25000,100000" to display the map when the current draw scale is between 1:25000 and 1:100000.
- ADD_FILE - specifies the full path to a file to add to the map catalog. You can include wildcard characters, like * and ?, in the filename. You can also include multiple ADD_FILE parameters to add multiple files in one command. For example, to add all of the ECW files in a folder to the catalog, use ADD_FILE="C:\path_to_files\*.ecw".
- PROJ - if provided, this projection will be used as the native projection for any file(s) added to the catalog with this command. Use the special Projection Specification Values to define the projection.
- ADD_FILE_LIST - specifies the full path to a text file listing maps to add to the map catalog. The text file should contain the full path to each file to add on each line of the file.
- REMOVE_MAP - specifies the full path of a file to remove from the map catalog. You can include wildcard characters, like * and ?, in the filename. You can also include multiple ADD_FILE parameters to remove multiple files in one command. For example, to remove all of the ECW files in the map catalog, use REMOVE_MAP="*.ECW". To clear out a map catalog, use REMOVE_MAP="*". To remove a file by filename without specifying a folder, use a * wildcard character of variable lengthfor the path. For example to remove "c:\temp\my_map.tif", you could use REMOVE_MAP="*\my_map.tif" or REMOVE_MAP="c:\temp\my_map.tif".
- LOAD_FLAGS - specifies the load flags to use for the file. These are the same as used for the IMPORT command. Use this to skip any load prompts. The values are format specific.
- Any of the parameters of The IMPORT_ASCII command imports data from a generic ASCII text file for later use. The following parameters are supported by the command. In addition, all of the option parameters for the IMPORT command are also supported for this command. may be specified when loading text files into a map catalog to specify how to handle loading them without a prompt
SAMPLES
Here is a sample showing how to create a map catalog and then load it:
// Create the map catalog. Maps should show when they take up at least 10% of display. EDIT_MAP_CATALOG FILENAME="C:\TEMP\EXPORT TEST\script_catalog.gmc" CREATE_IF_EMPTY=YES \ ADD_FILE="c:\temp\export test\*.tif" ADD_FILE="c:\temp\export test\*.dem" \ ZOOM_DISPLAY="PERCENT,0.10,0" // Load the map catalog IMPORT FILENAME="c:\temp\export test\script_catalog.gmc"
This example loads a text file into a map catalog:
EDIT_MAP_CATALOG FILENAME="%SCRIPT_FOLDER%catalog.gmc" CREATE_IF_EMPTY=YES \ ADD_FILE="%SCRIPT_FOLDER%points.txt" ZOOM_DISPLAY="PERCENT,0.10,0" \
TYPE="POINT_ONLY" COORD_DELIM="AUTO" COORD_FORMAT="DECIMAL" COORD_ORDER="X_FIRST" \ INC_COORD_LINE_ATTRS="NO" COL_HEADERS="NO" INC_ELEV_COORDS="YES"