Tool Floodplain Land Cover Proportions - USEPA/ATtILA2 Wiki

Floodplain Land Cover Proportions

Summary

Calculates the percentage of floodplain area within a reporting unit classified as selected land cover classes and creates an output table.

Usage

To be edited.

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

    • [class flcpField] or f[class Id] - The percent of the non-excluded floodplain area within a reporting unit occupied by the land cover class.

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

        • (e.g., NINDEX_Flood for <class Id="NI" Name="All Natural Land Use" filter="" flcpField="NINDEX_Flood">)
      • f[class Id] - is used if an flcpField attribute is not provided.

        • (e.g., fNI for <class Id="NI" Name="All Natural Land Use" filter="">)
    • 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 occuring in floodplains within each reporting unit. The field naming conventions is dependent on whether an flcpField is provided in the Land cover classification file:

        • [class flcpField]_A or f[class Id]_A - The area of the rasterized floodplain area, by reporting unit, occupied by the land use class.
    • Add Quality Assurance Fields

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

        • FLCP_OVER - The percent overlap between the floodplain areas in each reporting unit and the Land cover grid.

        • FLCP_TOTA - The total raster floodplain area for each reporting unit (zone).

        • FLCP_EFFA - The effective raster area within a reporting unit's (zone) floodplain area after excluded classes have been removed.

        • FLCP_EXCA - The raster area of the excluded classes within a reporting unit's (zone) floodplain area based on exclusions in the Land cover classification scheme.

        • FLCP_PCT - The percentage of the reporting unit classified as floodplain.

    • 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:

        • flcp_Landcover# (raster) - Copy of the Land cover grid where non-floodplain areas (floodplain raster value = 0) are set to NULL. Produced when the Floodplain raster or polygon feature is a raster.

        • flcp\Intersect# (vector) - Intersection of the Reporting unit feature and the Floodplain raster or polygon feature. Produced when the Floodplain raster or polygon feature is a polygon feature class.

        • flcp_FldplnByRU# (vector) - Created by performing a Dissolve operation on flcp\Intersect# using the Reporting unit feature Id field as the dissolve field. The output contains multipart features. Produced when the Floodplain raster or polygon feature is a polygon feature class.

        • flcp_TabArea# (table) - A table of areas corresponding to the values in the Land cover grid occuring in floodplains within each reporting unit.

          • If the Floodplain raster or polygon feature is a polygon feature, the table is generated by performing a Tabulate Area operation using the flcp_FldplnByRU# and the copied Reporting unit feature Id field as the zone identifier and the Land cover grid as the raster to be summarized.

          • If the Floodplain raster or polygon feature is a raster, the table is generated by performing a Tabulate Area operation using the Reporting unit feature and its Reporting unit feature Id field as the zone identifier and the flcp_Landcover# as the raster to be summarized.

        • flcp_TabAreaFP# (table) - A table of floodplain (VALUE_1) and non-floodplain (VALUE_0) areas within each reporting unit. Produced when the Floodplain_raster_or_polygon_feature is a raster and QAFIELDS is selected in Additional options.

        • 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.

Syntax

FLCP (Reporting_unit_feature, Reporting_unit_ID_field, Land_cover_grid, Land_cover_classification_scheme, Land_cover_classification_file, Report_metrics_for_these_classes, Floodplain_raster_or_polygon_feature, Output_table, {Processing_cell_size}, {Snap_raster}, Select_options, {Reduce_land_cover_grid_to_smallest_recommended_size})

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
Floodplain_raster_or_polygon_feature The raster or vector polygon dataset that delineates floodplain areas.

Floodplains are defined as:

  • Grid cells with value = 1 for raster datasets.
  • Any polygon feature for polygon datasets.
Feature Layer or Raster Layer
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
Reduce_land_cover_grid_to_smallest_recommended_size (Optional) Specifies whether the Land cover grid extent will be clipped to that of the Reporting unit feature layer during processing.

  • false - The Land cover grid will not be clipped. This is the default.
  • true - The Land cover grid will be clipped. This option may save processing time if the Land cover grid extent is larger than the extent of the Reporting unit feature layer.
Boolean

Code Samples

Floodplain Land Cover Proportions example 1 (Python window)

This example returns a table with the following fields: the proportion of the floodplain in the reporting unit zone comprised of agriculture land cover, and the proportion of the floodplain in the reporting unit zone comprised of developed land cover. The options to retain the intermediate calculation products, to add the square area values for the selected land cover classes in the floodplain, 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 = "'agr  -  [fagr]  Agriculture';'dev  -  [fdev]  Developed'"
Floodplain_raster_or_polygon_feature = r"D:\pyexamples\data.gdb\Floodplain_Raster"
Output_table = r"D:\pyexamples\results.gdb\Watersheds_FLCP"
Processing_cell_size = "30"
Snap_raster = r"D:\pyexamples\data.gdb\NLCD_2016"
Select_options = "'AREAFIELDS  -  Add Area Fields for All Land Cover Classes';'INTERMEDIATES  -  Retain Intermediate Layers Generated During Metric Calculation';'QAFIELDS  -  Add Quality Assurance Fields'"
Reduce_land_cover_grid_to_smallest_recommended_size = "false"

metric.runFloodplainLandCoverProportions(Reporting_unit_feature,
                                         Reporting_unit_ID_field,
                                         Land_cover_grid,
                                         Land_cover_classification_scheme,
                                         Land_cover_classification_file,
                                         Report_metrics_for_these_classes,
                                         Floodplain_raster_or_polygon_feature,
                                         Output_table,
                                         Processing_cell_size,
                                         Snap_raster,
                                         Select_options, 
                                         Reduce_land_cover_grid_to_smallest_recommended_size)

Floodplain Land Cover Proportions example 2 with raster floodplain input (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 Generating land cover in floodplain grid...
Time: yyyy-mm-dd hh:mm:ss Save intermediate grid complete: flcp_Landcover0
Time: yyyy-mm-dd hh:mm:ss Tabulating the area of the flood plains within each 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 Page

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