GENERATE_LAYER_BOUNDS

The GENERATE_LAYER_BOUNDS command create a new layer with a single bounding box area created from the bounding box of each loaded layer or a polygonal coverage of the valid data in the layer if specified by the BOUNDS_TYPE parameter:

  • LAYER_DESC - specifies the description to use the for created layer
  • FILENAME - filename of the layer to generate bounds for. If an empty value is passed in, all layers that were created by the script, such as those from a GENERATE_CONTOURS command, will have bounds created for. This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2". When running the script in the context of the main map view (including loading a workspace) you can also pass in the value 'USER CREATED FEATURES' to have the 'User Created Features' layers unloaded or 'SELECTED LAYERS' to have any layers selected in the Control Center unloaded. You can also pass in the full description of the loaded layer to use in case you want to process a layer not loaded from a file. If you do not provide a FILENAME parameter then all loaded layers will have their bounds generated.
  • BOUNDS_TYPE - specifies whether to create bounding box or polygon coverages. The following values are supported:
    • BOUNDS - (default) A bounding box in the native projection of the layer is created.
    • POLYGON - A coverage polygon is calculated covering the features/valid data in the layer
    • RECT_ONLY - This is the same as the BOUNDS value, except the bounding box is in the current projection rather than the native layer projection.
  • MAX_VERTEX_COUNT - specifies the maximum number of vertices to include in a polygonal coverage. The default is MAX_VERTEX_COUNT=32. If the polygonal coverage has more than the specified maximum count the polygon will be simplified until it has less vertices than the specified count.
  • COVERAGE_SMOOTHING_FACTOR - specifies a smoothing factor to use when creating polygonal coverage areas for vector/Lidar layers to control how tightly shrink-wrapped around the vector features the area is. The default value is 1.0, but any value greater than 0 is allowed, with larger values resulting in more smoothing.