tmdl_export_gpkg: Export TMDLs to a GeoPackage

View source: R/tmdl_export_gpkg.R

tmdl_export_gpkgR Documentation

Export TMDLs to a GeoPackage

Description

Export active TMDLs from the TMDL reach database to a GeoPackage (.gpkg). This allows the data to be viewed spatially in a GIS. The TMDL database is an inventory where non-tribal Oregon TMDLs have been developed. The output does not includes TMDLs that have been rescinded or replaced with newer TMDLs. Note the inventory is still being developed and some information may not be accurate. See each relevant TMDL document for more information and applicability. The full TMDL reach database is currently only available to Oregon DEQ employee.

Usage

tmdl_export_gpkg(
  gpkg_dsn,
  gpkg_layer,
  tmdl_reaches,
  tmdl_actions = NULL,
  nhd_fc,
  action_ids = NULL,
  TMDL_param = NULL,
  TMDL_pollu = NULL,
  collapse = TRUE
)

Arguments

gpkg_dsn

data source name. The path and name of output GeoPackage database. Passed to 'dsn' argument in st_write.

gpkg_layer

layer name. The name of the output layer in the GeoPackage database. Passed to 'layer' argument in st_write.

tmdl_reaches

Oregon TMDL reach table. The database is currently only available to Oregon DEQ employees.

tmdl_actions

Oregon TMDL action table. Default is NULL and tmdl_actions will be used.

nhd_fc

The NHD feature class that the TMDL database will be attributed to. The "Permanent_Identifier" field is used for joining.

action_ids

vector of TMDL action IDs used to filter the TMDLs. Default is NULL and all TMDLs are included.

TMDL_param

vector of water quality parameter names used to filter the TMDLs. The output will include TMDLs that addressed that water quality parameter. Default is NULL and all parameters are included.

TMDL_pollu

vector of TMDL pollutant parameter names used to filter the TMDLs. The output will include TMDLs that addressed that pollutant parameter. Default is NULL and all pollutants are included.

collapse

logical. If TRUE (the default), the values in action id, TMDL_name, TMDL_wq_limited_parameter, and TMDL_pollutant are collapsed (pasted together) into a string separated by a semi-colon if they share a common Permanent_Identifier, AU_ID, HUC_6, and HUC_8 value. Each field is collapsed separately.

Details

The TMDL database is georeferenced to the National Hydrography Dataset (NHD). The NHD field attributes corresponds to NHDH_OR_931v220, which is the current version used for DEQ business data. Oregon's Assessment Unit fields are current as of 03-30-2022.

Output GeoPackage fields include:

  • action_id: EPA ATTAINS Action ID assigned to each TMDL document.

  • TMDL_name: Name of TMDL document and abbreviated citation of TMDL.

  • TMDL_wq_limited_parameters: Name of the water quality limited 303(d) parameter that the TMDL addresses.

  • TMDL_pollutant: Name of TMDL pollutant causing the water quality impairment.

  • TMDL_status: Status of TMDL for the parameter and pollutant.

    • Active: TMDL has been approved by EPA and is active.

    • Not Active: TMDL has been withdrawn, disapproved by EPA, and/or replaced with a newer TMDL.

    • In Development: TMDL is in development.

  • TMDL_scope: Provides information about how the TMDL applies.

    • TMDL: Identifies segments that a TMDL was developed for.

    • Allocation only: Identifies segments where a TMDL allocation applies but the TMDL does not address a 303(d) listing in that segment. Typically this situation is applicable for tributaries or canals that are upstream of the segment where the "TMDL" applies. The pollutant reduction in the upstream segment is needed to achieve the TMDL loading capacity of the downstream segment. This is common for TMDLs that address narrative water quality standards or cases when the pollutant is not the same as the listed parameter (e.g. nutrients).

    • Advisory allocation: Identifies segments that have suggested non regulatory allocations; or segments that may be used to assess progress or status of allocation attainment but the segment is not the regulatory compliance point as defined in the TMDL.

  • Period: Identifies the fish use period TMDLs for temperature or dissolved oxygen address.

    • year_round: TMDL developed to address only non spawning (year round) uses for temperature or dissolved oxygen water quality standards.

    • spawning: TMDL developed to address only spawning uses for the temperature or dissolved oxygen water quality standards.

    • Both: TMDL developed to address both spawning and non spawning (year round) uses for temperature or dissolved oxygen water quality standards.

  • geo_id: Unique ID assigned to the NHD reaches where a TMDL target applies. ID is structured as YearTMDLissued_ShortTMDLdocName_TargetGeoArea.

  • citation_abbreviated: Abbreviated citation of TMDL document using DEQ style guidelines (Chicago Manual of Style).

  • citation_full: Full citation of TMDL document using DEQ style guidelines (Chicago Manual of Style).

  • HUC6: Basin six digit USGS hydrological unit code.

  • HU6_Name: USGS Basin name.

  • HUC6_full: Concatenation of the HUC6 and HUC6_Name fields.

  • HUC8: Subbasin six digit USGS hydrological unit code.

  • HUC8_Name: USGS Subbasin name.

  • HUC8_full: Concatenation of the HUC_8 and HU_8_NAME fields.

  • GLOBALID: Unique ID for every NHD reach record. Used for joins with TMDL GIS features.

  • Permanent_Identifier: NHD Permanent Identifier.

  • ReachCode: NHD Reach code.

  • WBArea_Permanent_Identifier: NHD Waterbody feature Permanent Identifier

  • FType: Three-digit integer value; unique identifier of a feature type.

  • GNIS_Name: Proper name, specific term, or expression by which a particular geographic entity is known

  • GNIS_ID: Unique identifier assigned by GNIS, length 10.

  • AU_ID: Assessment Unit ID.

  • AU_Name: Name of the assessment unit.

  • AU_Description: Assessment unit descriptions.

  • AU_WBType: Assessment unit waterbody type code

  • AU_GNIS_Name: Assessment unit and GNIS name concatenation.

  • AU_GNIS: Same as GNIS name but with a few additional names not in NHD.

  • LengthKM: Length of linear feature based on Albers Equal Area.


DEQcdonald/odeqtmdl documentation built on Feb. 9, 2025, 10:13 a.m.