Tool Riparian Land Cover Proportions - USEPA/ATtILA2 GitHub Wiki

Riparian Land Cover Proportions

Summary

Calculates the percentages of selected land cover types within the area adjacent to input features in each reporting unit and creates an output table.

Input features may be lines or polygons or both.

Adjacency is determined by a buffer distance specified by the user.

Additionally, reporting unit boundaries can be selected to act as an absolute barrier when creating buffer areas or ignored. If boundaries are enforced, buffer areas for features outside of the reporting unit will stop at the reporting unit boundary, elsewise buffer areas for features outside of the reporting unit are allowed inside the reporting unit.

Usage

  • This tool processes all polygons in the Reporting unit feature regardless of selections set. The ability to limit calculations to only selected reporting unit polygons is not supported in this release.

  • NOTE: For the most accurate results and shortest processing times, it is highly recommended that all input layers be in the same spatial reference.

  • NOTE: Enabling the Parallel Processing Factor environment can improve computation time for several ATtILA tools, but we have detected, on rare occasions, doing so can lead to spurious results. As a precaution, ATtILA will disable the Parallel Processing Factor environment for this tool. We hope to return this choice to the user once the impact on operational speed and accuracy of swapping geoprocessing tools with their pairwise counterparts has been assessed.

  • This tool is designed to use a vector line or polygon dataset that represents streams, but any vector line or polygon dataset may be used. Caution should be exercised when interpreting results, particularly when using datasets that do not represent streams.

  • The Reporting unit feature is a zone dataset.

    • A zone is defined as all areas in the input that have the same value. The areas do not have to be contiguous. The term "value" in this definition refers to the unique values in the Reporting unit ID field. Therefore, all polygons with the same reporting unit ID are treated as a single zone.

    • When more than one polygon has the same reporting unit ID, the areas for each polygon are combined and metrics are reported as a single record in the Output table.

    • NOTE: ArcGIS software has been improved over the years to analyze larger and larger datasets. However, limits do exist and large datasets can still cause problems. The Riparian Land Cover Proportions calculator can fail if an input Reporting unit feature contains a large number of reporting units and/or the reporting units cover a significantly large geographical area. Often this type of failure will manifest itself in a Failed to execute (Intersect) error. See Failed to execute (Intersect) for possible workarounds.

  • The tool extracts the Reporting unit feature polygons that overlay the Stream features buffers using an Intersect and Query. This results in an intermediate polygon feature class containing multipart features of all buffer areas in each reporting unit. The tool then performs a vector to raster conversion of the multipart features to create zones for each reporting unit.

    • To better control the vector to raster conversion, the tool defaults the Snap raster and the Processing cell size to that of the Land cover grid. These may be changed from within the tool.

    • If a large size disparity exists between the extents of the Reporting unit feature and the Land cover grid, the user may wish to set the Extent in Environment Settings > Processing Extent to the smaller of the two to avoid unnecessary processing.

  • If the Reporting unit feature has overlapping features, the zonal analysis will be performed for each individual feature.

  • If a feature in the Reporting unit feature zone data does not overlap any cell centers in the secondary class rasters (e.g.,Land cover grid), those zones will not get converted to the internal zone raster. As a result, those zones will not be represented in the Output table.

  • The Land cover classification scheme must correspond to the Land cover grid.

    • Schemes for common land cover datasets are included with ATtILA. Supplied schemes may be designated as either "ALL" or "LAND" (e.g. NLCD 2001 ALL vs. NLCD 2001 LAND). Schemes designated as "ALL" include all land cover classes in the metric calculations, while those designated as "LAND" include only terrestrial land cover classes, with non-terrestrial land cover classes such as water and snow/ice excluded. More information about each of the classification schemes supplied with ATtILA may be found in Supplied Land Cover Classification Schemas.

    • In addition to the common land cover schemes, the tool permits a user-defined land cover classification scheme to be used by specifying a Land cover classification file. Refer to Land Cover Classification for more information on how ATtILA may be customized for user-specific needs.

    • NOTE: When a classification scheme with excluded land cover classes is selected, the areas of the excluded classes are disregarded in metric calculations. For example, when selecting a "LAND" classification scheme, the tool will process individual land cover classes and calculate metrics based on the total terrestrial area they occupy within the reporting unit, rather than the percent of the total area within the reporting unit. See Values Element in ATtILA's LCC XML Document and Values Window in the Land Cover Classification Editor for more information on excluded values.

  • Stream features may be one or more vector line or polygon datasets. The Buffer distance specifies the distance around the input features for which buffer zones are created.

    • When Stream features is a line dataset, the buffer occurs on both sides of each line.

    • When Stream features is a polygon dataset, the tool treats the polygon perimeters as lines. The buffer occurs on both sides of each polygon perimeter.

  • Final output is written to the location specified in the Output table parameter. The Output table may be saved as a File Geodatabase Table, or a dBASE Table.

    • NOTE: For most consistent results, it is highly recommended that tool output be saved to a file geodatabase.

    • When saving as a File Geodatabase Table, no extension is necessary for the Output table name. The output location must be a file geodatabase.

    • When saving as a dBASE Table, include the .dbf extension in the Output table name. dBASE tables may not be saved in a file geodatabase.

  • Field names in the Output table follow this naming scheme:

    • [class rlcpField] or r[class Id][buffer distance] - The percent of the total buffered area in the reporting unit occupied by the land cover class.

      • [class rlcpField] is used if an rlcpField attribute is provided in the class's element in the selected Land cover classification file.

        • (e.g., RiparianForest for <class Id="for" Name="Forest and Woody Wetland" filter="" rlcpField="RiparianForest">)
      • r[class Id][buffer distance] - is used if an rlcpField attribute is not provided.

        • (e.g., rfor45 for <class Id="for" Name="Forest and Woody Wetland" filter=""> and a 45 meter buffer distance is used)
    • NOTE: Output field names can be altered by editing the Land cover classification file with the Land Cover Classification Editor (Refer to Classes Element in ATtILA's LCC XML Document for general information, or the individual Land cover classification file for details).

    • NOTE: The output field name for each class is shown as the second item next to the class's check box in Report metrics for these classes.

  • In Additional Options, the user may elect to 'Add Quality Assurance Fields', 'Add Area Fields', and/or 'Retain Intermediate Layers Generated During Metric Processing'.

    • Add Area Fields

      • Choosing AREAFIELDS adds fields to record the raster area measurement of the selected land cover classes within the buffer area in each reporting unit. The field naming conventions is dependent on whether an rlcpField is provided in the Land cover classification file:

        • [class rlcpField]_A or r[class Id][buffer distance]_A - The area of the rasterized Stream features buffer, by reporting unit, occupied by the land cover class.
    • Add Quality Assurance Fields

      • Choosing QAFIELDS adds a number of fields to the Output table to facilitate quality assurance checking.

        • RLCP_OVER - The percent overlap between the Stream features buffer areas in each reporting unit and the Land cover grid.

        • RLCP_TOTA - The total raster zonal area for all Stream features buffers in each reporting unit (zone) after the buffer areas have been rasterized.

        • RLCP_EFFA - The effective raster area of all Stream features buffers in each reporting unit (zone) after excluded classes have been removed.

        • RLCP_EXCA - The raster area of the excluded classes within the Stream features buffers in each reporting unit (zone) based on exclusions in the Land cover classification scheme.

        • rTOTA[buffer distance] - The percentage of the reporting unit comprised of the Stream features buffer area.

        • rEFFA[buffer distance] - The percentage of the effective area in the reporting unit found in the Stream features buffer area.

    • Retain Intermediate Layers Generated During Metric Calculation

      • Choosing INTERMEDIATES retains several of the key intermediate products (e.g., rasters, feature classes, tables) used to generate the final tool output. By examining the intermediate products, the user can gain a better understanding how the metric is calculated. The following intermediate products are listed in the general order they are generated:

        • rlcp_Dissolve_[Buffer distance]_# (vector) - Copy of the Reporting unit feature dissolved on the Reporting unit ID field. This feature class is only produced if duplicate values are found in the Reporting unit ID field.

        • rlcp_TabAreaRU# (table) - A table of areas corresponding to the values in the Land cover grid occurring in each reporting unit. This table is only produced when Add Quality Assurance Fields is selected in Additional Options.

        • Intermediates when Enforce reporting unit boundaries = TRUE

          • rlcp_[Input stream feature name] (vector) - A copy of the input stream feature with any Z-Values and M-Values removed from its vertices. This feature class is only produced if the input stream feature has Z or M values.

          • rlcp_[Input stream feature name]_intersect# (vector) - Copy of an input stream feature intersected with Reporting unit feature. This step assigns the Reporting Unit's ID value to the input features and eliminates segments outside of the reporting unit boundaries. The Reporting unit ID field is also renamed to new[Reporting unit ID field].

          • rlcp_[Input stream feature name]_buffer# (vector) - Copy of rlcp_[Input stream feature name]_intersect# buffered to the Buffer distance. The attribute table will retain the new[Reporting unit ID field] field.

          • rlcp_[Input stream feature name]_2ndintersect# (vector) - Copy of rlcp_[Input stream feature name]_buffer# intersected with Reporting unit feature. This step assigns the Reporting Unit's ID value to the buffer areas and eliminates segments outside of the reporting unit boundaries. The attribute table will now contain both the original Reporting unit ID field and the new[Reporting unit ID field]. If only one input in Stream features is provided, the features with matching values in Reporting unit ID field and the new[Reporting unit ID field] are dissolved by reporting unit. Features without matching values are eliminated. This dissolved feature class is the final output, rlcp_Buffer[buffer distance]#, if only one input in Stream features is provided.

          • rlcp_[Input stream feature name]_finalOutput# (vector) - Dissolved features of rlcp_[Input stream feature name]_2ndintersect# where the values in the Reporting unit ID field equaled those in the new[Reporting unit ID field]. This results in buffer areas that fall outside of the input feature's reporting unit being eliminated. This feature class is only produced if more than one Stream features themes are supplied.

          • rlcp_mergeOutput# (vector) - This feature class is produced by merging all rlcp_[Input stream feature name]_finalOutput# layers together. This feature class is only produced if more than one Stream features themes are supplied. If no polygon features are provided in the Stream features, this layer is then dissolved by the Reporting unit ID field to produce the final output, rlcp_Buffer[buffer distance]#.

          • rlcp_Buffer45Meters0_preErase# (vector) - This feature class is produced by dissolving the rlcp_mergeOutput# by reporting unit ID. It is only produced if more than one Stream features themes are supplied and at least one is a polygon layer.

          • rlcp_erasePolygons# (vector) - This feature class is produced by merging all polygon input stream features into one layer. When present, the final output, rlcp_Buffer[buffer distance]#, is produced by erasing areas in rlcp_Buffer45Meters0_preErase# with it. This feature class is only produced if more than one Stream features themes are supplied and at least one is a polygon layer.

        • Intermediates when Enforce reporting unit boundaries = FALSE:

          • rlcp_[Input stream feature name]_Buffer# (vector) - Copy of features in the [Input stream feature name] buffered to the Buffer distance. The attribute table will contain fields from the Sample point features, the buffer distance (BUFF_DIST), and a field named, 'ORIG_FID'. To eliminate unnecessary features before buffering, only features in the [Input stream feature name] that are within the Buffer distance of features in Reporting unit feature are retained.

          • rlcp_Merge# (vector) - This feature class is produced by merging all rlcp_[Input stream feature name]_Buffer# layers together. The merge operation wil also be performed even if there is only one input. In that instance, the merge will create a copy of the buffer theme without any unnecessary fields. It is essentially a FeatureClassToFeatureClass operation with fieldMappings.

          • rlcp_Intersect# (vector) - A polygon feature class with rlcp_Merge# intersected with Reporting unit feature. This step assigns the Reporting Unit's ID value to the buffer zones and eliminates buffer areas outside of the reporting unit boundaries.

          • rlcp_ErasePolygons# (vector) - This feature class is produced by merging all polygon Stream features. It is only produced if more than one Stream features themes are polygon layers.

          • rlcp_Erase# (vector) - This feature class is produced by erasing the sections of rlcp_Intersect# that occur within the interior of any polygon input stream feature. It is only produced if Stream features contains at least one polygon layer.

        • rlcp_Buffer[buffer distance]# (vector) - A polygon feature class containing all Stream features buffered by the selected buffer distance within each reporting unit merged by Reporting unit ID field.

        • rlcp_TabArea# (table) - A table of areas corresponding to the values in the Land cover grid occurring in the buffer area within each reporting unit.

        • NOTE: To ensure unique filenames, intermediate filenames are typically generated using the CreateScratchName ArcPy function. This function provides a unique name for the intermediate product by appending a number to a filename prefix. The number starts at 0 and is incremented until a unique filename for the output workspace is found. The generated number is represented in this manual by the hashtag (#) symbol.

        • NOTE: The appended number may not be the same for all intermediate products saved during a tool run. Running a tool with different input options can result in different intermediate products being produced. If a tool is run more than once using the same output workspace, different number suffixes may be generated depending on the files already present in the output workspace.

      • Intermediate products are saved to one of the following locations:

        • When the Output table is saved as a File Geodatabase Table, intermediate products are placed in the same file geodatabase.

        • When the Output table is saved as a dBASE Table, a file geodatabase named "attilaScratchWorkspace" is automatically generated in the same output location specified for the Output table. Intermediate products are placed in the attilaScratchWorkspace file geodatabase.

        • NOTE: ATtILA will report the location of the saved intermediate products in the Tool Details' Messages section.

Syntax

RLCP (Reporting_unit_feature, Reporting_unit_ID_field, Land_cover_grid, Land_cover_classification_scheme, Land_cover_classification_file, Report_metrics_for_these_classes, Stream_features, Buffer_distance, Output_table, {Processing_cell_size}, {Snap_raster}, Select_options)

Parameter Explanation Data Type
Reporting_unit_feature The vector polygon dataset that defines the reporting units. Feature Layer
Reporting_unit_ID_field The field in the Reporting unit feature layer that contains the unique ID for each reporting unit.

It may be an integer or a string data type.
Field
Land_cover_grid The raster dataset representing land cover classes to be summarized within each Reporting unit feature.

The grid input must be an integer raster layer.
Raster Layer
Land_cover_classification_scheme The land cover classification schemes included in ATtILA and a User Defined option.

The default schemes correspond to common input land cover datasets. Two schemes are supplied for each dataset included in ATtILA:

  • {DATASET NAME} ALL - includes all land cover types in the grid with no exclusions.
  • {DATASET NAME} LAND - excludes non-terrestrial land cover types.
String
Land_cover_classification_file The full pathname to the user-defined .xml file for custom or non-standard land cover classification schemes.

Pathname is automatically filled when a default scheme is selected.
File
Report_metrics_for_these_classes A list of the land cover classes and metric combinations for processing.

Check the box to calculate metrics for each land cover class and/or combination class desired within the reporting units.
Multiple Value
Stream_features The vector line and/or polygon dataset(s) that provide the basis for the buffer zones.

Land cover metrics are calculated for the area within the buffer zones.
Feature layer
Buffer_distance The distance around the Stream features which comprises the buffer zones.

The value must be an integer.

If the distance linear units are not specified or are entered as Unknown, the linear unit of the input features' spatial reference is used.
Linear unit
Enforce_reporting_unit_boundaries Specifies whether a Reporting unit boundary acts as an absolute barrier when creating buffer areas.

  • false - Buffer areas for features outside of the reporting unit are allowed inside the reporting unit boundary.
  • true - Buffer areas for features outside of the reporting unit will stop at the reporting unit boundary. This is the default.
Boolean
Output_table The output reporting unit metrics table to be created.

It is recommended that the Output table be saved within a file geodatabase.
Table
Processing_cell_size (Optional) The Processing cell size for the zonal operation.

The default Processing cell size is the cell size of the input raster land cover data. Optionally, the user may select a different cell size.
Analysis cell size
Snap_raster (Optional) The raster that the cell alignment of the Land cover grid and rasterized Reporting unit feature layer will be matched to during processing.

The default Snap raster is the Land cover grid.
Raster Layer
Select_options Three tool options are available to provide additional information:

  • Add Quality Assurance Fields - Adds area fields to the Output table to facilitate quality assurance checking.
  • Add Area Fields for All Land Cover Classes - Adds fields to the Output table that includes the areas of each land cover class and combination class selected.
  • Retain Intermediate Layers Generated During Metric Calculation - Saves the intermediate table and/or raster that is normally deleted after processing is complete.
Multiple Value

Code Samples

Riparian Land Cover Proportions example 1 (Python window)

This example returns a table with the following fields: the proportion of the buffer area adjacent to streams in the reporting unit zone comprised of agriculture land cover, and the proportion of the buffer area adjacent to streams in the reporting unit zone comprised of forest land cover. The buffer distance was set at 45 meters and the buffer area could not cross the reporting unit boundary. The options to retain the intermediate calculation products, and to generate the quality assurance fields have also been selected.

NOTE: ATtILA tools that utilize the Report metrics for these classes parameter will clear all class selections when the tool is opened. This results in setting any variable set for that parameter to None when calling the tool from a script. Because of this, the standard scripting syntax (e.g. arcpy.ATtILA.LCP(variable 1, variable 2, variable 3, etc.) will fail. To overcome this idiosyncrasy, use the scripting example provided below. When using this technique, all variables are passed in as strings.

import arcpy
from arcpy.sa import *
arcpy.ImportToolbox(r"D:\Destination Folder\ATtILA v2.tbx")
from ATtILA2 import metric


Reporting_unit_feature = r"D:\pyexamples\data.gdb\Watersheds"
Reporting_unit_ID_field = "HUC_12"
Land_cover_grid = r"D:\pyexamples\data.gdb\NLCD_2016"
Land_cover_classification_scheme = "NLCD LAND"
Land_cover_classification_file = r"D:\Destination Folder\ToolboxSource\LandCoverClassifications\NLCD LAND.xml"
Report_metrics_for_these_classes = "'agrc  -  [ragrc]  Cultivated Crop';'for  -  [rfor]  Forest'"
Stream_features = r"D:\pyexamples\data.gdb\Stream_Lines;D:\pyexamples\data.gdb\Stream_Polygons"
Buffer_distance = "45 Meters"
Enforce_reporting_unit_boundaries = "true"
Output_table = r"D:\pyexamples\results.gdb\Watersheds_RLCP"
Processing_cell_size = "30"
Snap_raster = r"D:\pyexamples\data.gdb\NLCD_2016"
Select_options = "'INTERMEDIATES  -  Retain Intermediate Layers Generated During Metric Calculation';'QAFIELDS  -  Add Quality Assurance Fields'"

metric.runRiparianLandCoverProportions(Reporting_unit_feature,
                                         Reporting_unit_ID_field,
                                         Land_cover_grid,
                                         Land_cover_classification_scheme,
                                         Land_cover_classification_file,
                                         Report_metrics_for_these_classes,
                                         Stream_features,
                                         Buffer_distance,
                                         Enforce_reporting_unit_boundaries,
                                         Output_table,
                                         Processing_cell_size,
                                         Snap_raster,
                                         Select_options)

Riparian Land Cover Proportions example 2 (Tool Details Messages)

This is a sample capture of the geoprocessing messages generated during a typical tool run. It is provided here to assist in the understanding of the tool's processing steps.


Start Time: Day, Month dd, yyyy hh:mm:ss AM/PM
Started: yyyy-mm-dd hh:mm:ss Setting up environment variables
Intermediates are stored in this directory: workspace path
Time: yyyy-mm-dd hh:mm:ss Excluded values found in the land cover grid. Calculating effective areas for each reporting unit...
Selecting features from inStreamFeature1 within 45 Meters of Reporting units...
Buffering selected features...
Repairing buffer areas for input features...
Selecting features from inStreamFeature2 within 45 Meters of Reporting units...
Buffering selected features...
Repairing buffer areas for input features...
Selecting features from inStreamFeature3 within 45 Meters of Reporting units...
Buffering selected features...
Repairing buffer areas for input features...
Selecting features from inStreamFeature4 within 45 Meters of Reporting units...
Buffering selected features...
Repairing buffer areas for input features...
Merging buffer zones from all input Stream features...
Assigning Reporting unit ID values to buffer zones...
Removing interior waterbody areas from buffer result...
Dissolving intersections by reporting unit...
Time: yyyy-mm-dd hh:mm:ss Constructing the ATtILA metric output table
Time: yyyy-mm-dd hh:mm:ss Generating a zonal tabulate area table
Time: yyyy-mm-dd hh:mm:ss Processing the tabulate area table and computing metric values
Succeeded at Day, Month dd, yyyy hh:mm:ss AM/PM (Elapsed Time: ##.## units)

Tags

There are no tags for this item.

Credits

There are no credits for this item.

Use Limitations

There are no access and use limitations for this item.


arrow_up Top of the page     |     arrow_left Floodplain Land Cover Proportions     |     arrow_right Sample Point Land Cover Proportions


⚠️ **GitHub.com Fallback** ⚠️