COMBINE_TERRAIN

The COMBINE_TERRAIN command generates a new terrain (gridded elevation) layer by combining two loaded terrain layers through some operation, like addition, subtraction (difference), average, min/max, etc. The new terrain layer can then be operated on just like any other terrain layer.

The following parameters are used by the COMBINE_TERRAIN command:

  • LAYER1_FILENAME - full path and filename of the first loaded terrain layer to use. You can also pass in the full description of the loaded layer to use in case you want to use a layer not loaded from a file. If you are using one of the combine operations that works on multiple layers in a single list, like ADD, AVERAGE, MINIMUM, MAXIMUM, or COUNT_VALID, you can leave this blank and have all loaded layers examined.
  • LAYER2_FILENAME - full path and filename of the second loaded terrain layer to use. You can also pass in the full description of the loaded layer to use in case you want to use a layer not loaded from a file. You do not have to provide this for those operations that work on multiple layers in a single list, like ADD, AVERAGE, MINIMUM, MAXIMUM, or COUNT_VALID.
  • COMBINE_OP - defines the operation to perform when combining the layers. The following operations are supported:
    • ADD - adds the values from the first layer to the second
    • SUBTRACT_SIGNED - subtracts the values of the second layer from the first and saves the signed result.
    • SUBTRACT_UNSIGNED - subtracts the values of the second layer from the first and saves the magnitude of the result.
    • AVERAGE - saves the average of the values from the first and second layers.
    • MINIMUM - saves the smaller of the values from the first and second layers.
    • MAXIMUM - saves the larger of the values from the first and second layers.
    • MULTIPLY - multiplies the values from the first and second layers. If one or both of the values is missing, the sample is marked as invalid.
    • DIVIDE - divides the value from the first layer by the value in the second layer. If one or both of the values is missing or if the second value is 0, the sample is marked as invalid.
    • FILTER_KEEP_FIRST - saves the first layer value if the second layer value is valid.
    • FILTER_KEEP_FIRST_IF_SECOND_INVALID - saves the first layer value if the second layer value is invalid
    • FILTER_KEEP_FIRST_IF_GT_SECOND - saves the first layer value if the second layer value is valid and the first layer value is greater than the second layer value.
    • FILTER_KEEP_FIRST_IF_LT_SECOND - saves the first layer value if the second layer value is valid and the first layer value is less than the second layer value.
    • FILTER_KEEP_FIRST_IF_SECOND_GT_VAL - saves the first layer value if the second layer value is valid and the second layer value is greater than the value provided with the COMPARE_VAL parameter
    • FILTER_KEEP_FIRST_IF_SECOND_LT_VAL - saves the first layer value if the second layer value is valid and the second layer value is less than the value provided with the COMPARE_VAL parameter
    • COUNT_VALID - counts the number of layers that have a valid sample at each grid location. This works with both raster and elevation data.
  • COMPARE_VAL - provides a numeric value to compare against for some of the combine operations above.
  • LAYER_DESC - specifies the name to assign to the newly generated terrain layer. If no layer description is provided, the default name of "Combined Elevation Grid" will be used.
  • ELEV_UNITS - specify elevation units to use in new terrain layer
    • 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 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".
  • FILL_GAPS - specifies that small gaps in between and within the data sets being combined will be filled in by interpolating the surrounding data to come up with an elevation for the point in question. This option is off by default, specify FILL_GAPS=NO to turn off.



Topic Overview

Terrain Analysis

Tool Information

Combine/Compare Terrain Layers