The GENERATE_EQUAL_VAL_AREAS command allows for the generation of areas for regions of the same (or similar) color, elevation, or slope values from a loaded raster or elevation layer.
- FILENAME - specifies the filename of the already loaded layer from which to generate the equal-value areas. This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2".
- LAYER_DESC - specifies the description to use for the layer
- ATTR_NAME - specifies the name to use for the attribute holding the color, elevation, or slope that a particular area represents. If you leave this attribute off then no value attribute will be saved with each area.
- ATTR_FORMAT - specifies a custom format string for creating the color attribute. This would be a C-style string with either a single number parameter or 3 for separate red, green, and blue. Usually you wouldn't specify this and the default would then just be the same as ATTR_FORMAT="RGB( %3d, %3d, %3d )".
- AREA_TYPE - specifies the name of the area type to assign to the area features. See the Area Styles tab of the Configuration dialog for a list of available type names.
- EQUAL_COLORS (raster only) - specifies the color(s) to create areas for. If you don't provide one of more colors all colors are matched on. The color(s) should be specified as RGB(<red>,<green>,<blue>). For example, to create areas for white, use EQUAL_COLORS=RGB(255,255,255). Optionally, if the image that you are creating areas for uses a palette for the colors, you can specify a palette index in the following format: INDEX(<0-based palette index>). For example, to make the second color in the palette transparent, use EQUAL_COLORS=INDEX(1). You can provide more than one color to match on by providing a semi-color separated list, like EQUAL_COLORS="RGB(0,255,0);RGB(255,0,0)" to match on blue and red.
- COLOR_DIST - specifies how far from an exact match each color channel of a color value must be to be considered the same. By default a value of 0 is used which means exact matches only. If you want to break the entire color range into say 4 ranges for each color channel, use something like COLOR_DIST=32 as that would allow colors up to 32 away from each color channel value to match to a color.
- ELEV_DIST - specifies how far from an exact match (in meters) each value must be to be considered the same. By default a value of 0 is used which means exact matches only. If you want to say split into area groups 10 meters in size, use ELEV_DIST=5. This would give you areas with values between -5 and 5 meters, 5 and 15 meters, etc.
- SLOPE_DIST - specifies how far from an exact match (in degrees) each value must be to be considered the same. By default a value of 0 is used which means exact matches only. If you want to say split into area groups 10 degrees in size, use SLOPE_DIST=5. This would give you areas with values between 0 and 10 degrees, 10 and 20 degrees, etc.
- FORCE_RGB - specifies that the attribute value for a color-based area will always be the full RGB color and not a palette index/name if available. Use FORCE_RGB=YES to enable.
- FIX_INVALID - specifies whether or not the resulting areas should be split up into pieces if any invalid (i.e. self-intersecting) pieces are created. Use FIX_INVALID=YES to force the invalid areas to be fixed.
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.
This sample will generate equal-elevation areas of size 20 meters (10 meters on either side) from the specified DEM layer and store the elevation values in an attribute named ELEV for each area feature.
GENERATE_EQUAL_VAL_AREAS FILENAME="C:\temp\export test\blue_springs_4_quads.dem" ELEV_DIST=10.0 ATTR_NAME="ELEV"