EXPORT_RASTER

The EXPORT_RASTER command exports all currently loaded raster, vector, and elevation data to a file. The following parameters are supported by the command.

  • FILENAME - full path to file to save the data to. When using additional name parameters with Tiling/Gridding or Polygon Cropping, this can specify just a directory, or the prefix and/or extension for the filename.
  • 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.
  • 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".
  • PIXEL_SIZE_MAX - specifies the maximum desired size in pixels of your export. The format is the same as the PIXEL_SIZE parameter, but specifies the maximum dimension on either side. If the dimensions result in non-square pixels, a smaller pixel count will be used in width or height so that the pixel aspect ratio is maintained.
  • FORCE_SQUARE_PIXELS - if this value is set to YES, the spatial resolution of the resultant raster file will be set so that the x and y pixel size are the same, with the minimum default size being used for both.
  • SAMPLING_METHOD - specifies the sampling method to use when resampling this layer. The following values are supported:
    • DEFAULT - Use either automatic resampling based on export or layer resampling, depending on setting of global flag about whether to resample on export
    • AUTO - Automatically select a resampling method based on how the export resolution and bounds compare to the original layout for a layer. For example if you export to a lower resolution a box averager of appropriate size may be used automatically
    • LAYER - Use the sampling method set for each layer
    • The list of SAMPLING_METHOD values for the The IMPORT command imports a data file for later use. To determine the proper import parameters, one option is to load the file via the interface and save a workspace. The IMPORT command and parameters will be listed in the workspace file. The following parameters are supported by the command. command can also be specified to use a particular sampling method for all layers being exported

  • PALETTE_MAX_COLORS - specifies the maximum number of colors to use in an image-optimized or grayscale palette. The valid range is 2-256. If not specified, the value is the default max for the image format (typically 256).

  • NUM_BANDS - specifies how many bands of data to export for a PALETTE=MULTIBAND export. If you don't specify a value for this the band count will be the maximum available for any of the loaded layers.
  • BAND_BIT_DEPTH - specifies how many bits to use for each band of data for a PALETTE=MULTIBAND export. If you don't specify a value for this the highest bit depth of any of the input data layers will be used. The valid values are BAND_BIT_DEPTH=8, BAND_BIT_DEPTH=16, or BAND_BIT_DEPTH=32.
  • BAND_EXPORT_SETUP - allows you to override the default band assignment for a MULTIBAND export. Use the following format to specify what band from what layer to use for a given export band: <output_band>?<input_band>?<layer_filename> . So for example to assign the 4th (infrared) band in an export from the 1st (red) band in a previously loaded file name C:\data\input_file.tif, use the following parameter: BAND_EXPORT_SETUP="4?1?c:\data\input_file.tif". Note that you would include a separate BAND_EXPORT_SETUP parameter for each output band that you want to setup. If you leave off the filename then all loaded data will be considered as input, with just the input-to-output band assignment being updated.
  • INC_VECTOR_DATA - specifies whether or not loaded vector data should be rendered and exported to the generated image. Use a value of YES to indicate that vector data should be used. Any other value will result in vector data NOT being saved to the 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 a color for the point in question. This option is off by default, specify FILL_GAPS=YES to turn it on.
  • ONLY_GENERATE_METADATA (GEOTIFF, JPEG, and PNG only) - specifies that only metadata files like world files, TAB files, and PRJ files should be created for this file. This is useful for things like generating world and TAB files from GeoTIFF files without doing a whole new export. Just make the output filename the same as the loaded file to create the metadata for.
  • SAVE_SCALE_AND_LEGEND - specifies that the distance scale and elevation legend, if applicable and enabled for display on the Configuration dialog, should be exported to the generated raster file. Specify SAVE_SCALE_AND_LEGEND=YES to enable this option.
  • BG_TRANSPARENT (ECW, GEOTIFF, JPEG2000 and PNG only) - specifies that any areas of no data/background should be marked as transparent. Use BG_TRANSPARENT=YES to enable.
  • OVERWRITE_EXISTING - specifies that existing files should be overwritten. The default is OVERWRITE_EXISTING=YES, so use OVERWRITE_EXISTING=NO to skip exporting files that already exist.
  • EXPORT_SCALE - specifies the scale to do the export at. You must also specify a DPI value in order to use the EXPORT_SCALE parameter. For example to export at 1:50,000 scale, use EXPORT_SCALE=50000.
  • DPI (GEOTIFF, BMP, and JPG only or with EXPORT_SCALE parameter) - specifies the DPI (dots per inch) value to save in the generated file(s). For example, use DPI=300 to specify that the DPI for this file is 300. By default no DPI value will be written out.