EXPORT_WEB
The EXPORT_WEB command exports all currently loaded data to a tiled web format. The following parameters are supported by the command.
- FILENAME - output file name. For Google Maps, Bing, and OSM, this is the name of the HTML file that will be used to display the tiles. For TMS, this is the name of the XML file that contains the tile info. For KML Raster, this is the name of the KML/KMZ file. For MBTiles, this is the name of the SQLite database, with an extension of ".mbtiles". For RMaps, this is the name of the SQLite database, with an extension of ".sqlite". In all of these cases, the EXPORT_WEB command will create a new output file.
- EXPORT_LAYER - filename or description of layer(s) to export. By default all compatible and exportable layers are exported. You can include multiple EXPORT_LAYER parameters if you have multiple masks to search. Wildcards (* and ?) are supported. Hidden layers are not considered.
- TYPE - type of vector file we're exporting to
- GOOGLE_MAPS - Google Maps Tiles
- VIRTUAL_EARTH - Bing/Virtual Earth Tiles
- KML_RASTER - KML file with all data in a raster
- WORLDWIND - World Wind Tiles
- TMS - Tile Mapping Service tiles
- OSM - Open Street Maps Tiles
- MBTILES - MapBox MBTiles SQLite Database
- RMAPS - RMaps SQLite Database
-
MAX_ZOOM_LEVEL
- highest zoom level for which tiles will be created.
Valid zoom levels, and associated resolution using the default 256 x 256 pixel tiles are:
- 0 or not provided - automatically choose a default zoom level to capture the full detail of the layer(s) being exported
- 3 - 19568 meters/pixel
- 4 - 9784 meters/pixel
- 5 - 4892 meters/pixel
- 6 - 2446 meters/pixel
- 7 - 1223 meters/pixel
- 8 - 611 meters/pixel
- 9 - 306 meters/pixel
- 10 - 153 meters/pixel
- 11 - 76 meters/pixel
- 12 - 38 meters/pixel
- 13 - 19 meters/pixel
- 14 - 9.6 meters/pixel
- 15 - 4.8 meters/pixel
- 16 - 2.4 meters/pixel
- 17 - 1.19 meters/pixel
- 18 - 0.60 meters/pixel
- 19 - 0.30 meters/pixel
- 20 - 0.15 meters/pixel
- 21 - 0.07 meters/pixel
- 22 - 0.04 meters/pixel
- 23 - 0.02 meters/pixel
- NUM_ZOOM_LEVELS - contains the number of zoom levels to be created. The default is 5.
- MAP_NAME - user-defined name for the map.
- IMAGE_FORMAT - is the format to be used for the images. Choices are "PNG", "JPG"and "GMG". The default is "PNG". To export terrain tiles using the Global Mapper Grid (GMG) format, use IMAGE_FORMAT="GMG".
- QUALITY - For JPG format images specify the quality
- BG_MAP_NAME (Google Maps tiles only) - type of map to use as the background:
- ROADMAP - Road map
- SATELLITE - Satellite imagery
- HYBRID - Combination of ROADMAP and SATELLITE
- TERRAIN - Terrain map
- TRANSLUCENCY - amount of translucency for the tiles. The value must be between 0.0 and 1.0. 1.0 is Opaque, and the image gets more translucent as the numbers get lower. 0.0 is treated the same as 1.0. The default is 1.0.
- TILE_PATH - contains the directory where the tiles should be stored. If this is not specified, the tiles will be written to the directory specified for the FILENAME parameter.
- CUSTOM_TILE_FILENAME - custom definition for tile filenames. Use variables %z for zoom, %x for column, and %y for row. For example, use "%z\\prefix_%y_%x.png" to create one folder per zoom level. The tiles will be created in the path under the HTML filename path.
- TILE_SIZE - use this to override the default tile size for the selected TYPE. This value specifies the size of each tile in the resulting tile set. For example, using TILE_SIZE=1024 will result in tiles of size 1024x1024 being created rather than the default (typically 256x256).
- MBT_DESCRIPTION (MBTiles only) - map description that will be added to the MBTiles metadata .
- MBT_MAP_TYPE (MBTiles only)- indicates the type of map . Valid values are (default is "overlay"):
- BASEMAP - This map will be the base map.
- OVERLAY - This map will overlay another map.
- SPATIAL_RES - specifies spatial resolution. Defaults to the minimum spatial resolution of the two layers 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. You can also specify as a percentage of the default resolution by adding a percent. For example to get half the detail your double the spatial resolution value, so you would use SPATIAL_RES="200%,200%".
- SPATIAL_RES_METERS - specifies spatial resolution to use in meters. The value in meters will automatically be converted to the current view/ export projection units. For example, to do an export at 2.0 meter spacing (or as close as you can get to that in the current units), use SPATIAL_RES_METERS=2.0, or to do an export at 1.0 meters in X by 1.5 meters in Y, use SPATIAL_RES_METERS="1.0,1.5".
- PIXEL_SIZE - specifies the desired size in pixels of your export. Use this instead of SPATIAL_RES if you know exactly how many pixels in size your export should be. The format is PIXEL_SIZE="widthxheight". For example, to make your export have dimensions of 1024 pixels wide by 768 pixels tall, use PIXEL_SIZE="1024x768".
The following parameters accept boolean values ("YES" or "NO") to turn on or off the associated option (the default is no, but by listing the parameter it will be set to yes).
- WEB_NO_TRANSPARENCY - Do not use transparent background pixels
- WEB_HIDE_PROGRESS - Hide the progress bar windows
- WEB_ADD_SCALE_BAR (Google Maps Only) - Add a scale bar to the map
- WEB_ADD_MAP_TYPE_CONTROL (Google Maps Only) - Add a map type control
- WEB_ADD_OVERVIEW_MAP (Google Maps Only) - Add an Overview Map
- WEB_AUTO_GRID (KML Raster only) - Create a default grid
- WEB_SKIP_EMPTY_TILES - Skip tiles that have no data
- WEB_USE_JAVA_FILE_NAMES (World Wind only) - Create names for World Wind Java
- WEB_TRANSPARENT_TILES - Make the image tiles transparent
- WEB_SKIP_EXISTING_TILES - Skip tiles that already exist (resuming export)
- WEB_FILL_TO_TILE_BOUNDS - Fill the tiles to the bounds
- WEB_NO_HTML_FILE - Generate tiles only, no HTML file
- WEB_FORCE_PALETTE_PNG - Force the PNG to have palette instead of RGB
- WEB_FULL_TILES_ONLY - Only export tiles that are fully covered
-
WEB_USE_LAT_LON_TILES - if provided, the tiles will be exported in the lat/lon/WGS84 (EPSG 4326) projection rather than Web Mercator
-
Specify Bounding Box for Operation
See also Specify Bounds for Operation
- GLOBAL_BOUNDS - specifies the combine 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 combine 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 combine 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 west-most longitude, southern-most latitude, eastern-most longitude, northern-most latitude.
- LAYER_BOUNDS - specifies that the operation should use the bounds of the loaded layer(s) with the given filename. For example, to export to the bounds of the file "c:\test.tif", you would use LAYER_BOUNDS="c:\test.tif". Keep in mind that the file must be currently loaded.
- LAYER_BOUNDS_EXPAND - specifies that the operation should expand the used LAYER_BOUNDS bounding box by some amount. The amount to expand the bounding rectangle by should be specified in the current global projection. For example, if you have a UTM/meters projection active and want to expand the bounds retrieved from the LAYER_BOUNDS parameter by 100 meters on the left and right, and 50 meters on the top and bottom, you could use LAYER_BOUNDS_EXPAND="100.0,50.0". You can also specify a single value to apply to all 4 sides, or supply 4 separate values in the order left,top,right,bottom.
- SNAP_BOUNDS_TO_MULTIPLE - specifies that the top-left corner of the bounding box for the operation should be snapped to a multiple of the given value. For example, using SNAP_BOUNDS_TO_MULTIPLE=1 will snap the top-left corner to the nearest whole number. The values will always go smaller for X/easting/longitude and larger to Y/northing/latitude so you always get at least what is requested.
- SNAP_BOUNDS_TO_SPACING - specifies that the top-left corner of the bounding box for the operation should be snapped to a multiple of the resolution of the operation. For example, if you are exporting at 5 meter spacing, the top left corner will be snapped to the nearest multiple of 5. Use SNAP_BOUNDS_TO_SPACING=YES to enable or SNAP_BOUNDS_TO_SPACING=NO to disable. If not provided, the global setting for snapping exports to the nearest sample spacing boundary from the Advanced section of the General tab of the Configuration dialog will be used.
- USE_EXACT_BOUNDS - specifies that the exact bounds that were defined in the command should be used. Generally, when the bounds specified in a command are not the same as the data bounds, the command uses the intersection between the two. When USE_EXACT_BOUNDS=YES is specified, the command will use the bounds as specified, instead of the intersection.
-
Cropping to Polygons/Areas
See also Cropping Operations to Polygons/Areas
- POLYGON_CROP_FILE - specifies the full path and filename or loaded layer description of a vector file/loaded layer containing one or more polygon features to which the operation should be cropped. If multiple polygons are found in the specified file the polygon which has the largest intersection with the data to be combined will be used as the crop polygon (see POLYGON_CROP_USE_ALL or POLYGON_CROP_USE_EACH for exceptions).
- POLYGON_CROP_FILE_PROJ - specifies the projection to use for the POLYGON_CROP_FILE. Use if the file doesn't have an associated projection file. See special Projection Specification for instructions.
- POLYGON_CROP_NAME - specifies the name of a polygon shape previously defined using the DEFINE_SHAPE command to which the export should be cropped. The coordinates in the shape need to have been provided in whatever projection the new terrain layer will be in (i.e. the current projection). If you want to crop to any area features that are selected with the Digitizer Tool in the user interface rather than a defined polygon, use POLYGON_CROP_NAME="SELECTED".
- POLYGON_CROP_USE_ALL - specifies that if a POLYGON_CROP_FILE is specified that contains multiple polygons, the operation will be cropped to all polygons in that file rather than just the best-fit polygon.
- POLYGON_CROP_USE_EACH - specifies that if a POLYGON_CROP_FILE is specified that contains multiple polygons, the operation will generate a separate export for each polygons in that file rather than just the best-fit polygon. See the POLYGON_CROP_BBOX_ONLY and POLYGON_CROP_NAME_ATTR options for naming and other options when using this parameter. Use POLYGON_CROP_USE_EACH=YES to enable. This parameter also works with FEATHER_BLEND_EDGES. Use POLYGON_CROP_USE_EACH=YES with FEATHER_BLEND_POLY_FILE or FEATHER_BLEND_POLY to feather the edges of multiple polygons.
- POLYGON_CROP_EXCLUDE - specifies that the crop areas are actually regions to exclude from the export rather than include. If you add POLYGON_CROP_EXCLUDE=YES to the command the results will contain everything outside the crop areas but within the full export bounds.
- POLYGON_CROP_COMBINE_DUPS - specifies that if a POLYGON_CROP_FILE is specified that contains multiple polygons and POLYGON_CROP_USE_EACH is set, whether or not polygons with duplicate values for the attribute used for filenaming will be combined into a single export or split into separate exports. The default is POLYGON_CROP_COMBINE_DUPS=YES.
- POLYGON_CROP_BBOX_ONLY - specifies that if the POLYGON_CROP_USE_EACH parameter is specified that each export should just be cropped to the bounding box of each polygon rather than the actual boundary of the polygon. Use POLYGON_CROP_BBOX_ONLY=YES to enable only cropping to the bounding box.
- POLYGON_CROP_GRID_ONLY - specifies that any crop polygon(s) are used only to determine which tile/grid cells will be exported. For each tile/grid cell that intersects a crop polygon, the full tile/grid cell will be exported. Use POLYGON_CROP_GRID_ONLY=YES to enable.
- POLYGON_CROP_INT_DATA_BOUNDS - control how the bounding box for the export is determined if a crop polygon is specified. If this option is disabled, the export bounds will be the bounds of the crop area(s), even if they extend outside the data bounds, unless you explicitly specified a bounding box in the other parameters (i.e. LAYER_BOUNDS, GLOBAL_BOUNDS, etc.). If the option is enabled, the export bounds will be the intersection of the crop area bounds and the non-cropped bounding box (i.e. full data bounds or specified bounds in other parameter). This parameter is enabled by default, use POLYGON_CROP_INT_DATA_BOUNDS=NO to disable.
- POLYGON_CROP_NAME_ATTR - used to control the filenames generated when cropping to multiple polygons using the POLYGON_CROP_USE_EACH parameter. See special Attribute Name parameter details. This value will be appended to any filename specified in the EXPORT FILENAME parameter. If no value is provided, the exported files will be sequentially numbered.
- POLYGON_CROP_FOLDER_ATTR - used to control the filenames generated when cropping to multiple polygons using the POLYGON_CROP_USE_EACH parameter. See special Attribute Name parameter details.
- POLYGON_CROP_FILENAME_SUFFIX - specifies the text to insert in the output filename just before the file extension when cropping to polygons. For example, if you add POLYGON_CROP_FILENAME_SUFFIX="_out", the original FILENAME was "my_file_.dem" and the value from the polygon was "A1", you would get an output filename of "my_file_A1_out.dem".
- POLYGON_CROP_COMPARE_STR - specifies a compare string to use to filter out the areas in the polygon crop file. See the COMPARE_STR parameter for the EDIT_VECTOR script command for details.