An official website of the United States government.

This is not the current EPA website. To navigate to the current EPA website, please go to www.epa.gov. This website is historical material reflecting the EPA website as it existed on January 19, 2021. This website is no longer updated and links to external websites and some internal pages may not work. More information »

Event Indexing Service


Description

The Event Indexing Service allows applications to programmatically index features to NHDPlus hydrology creating RAD-ready event records.

Capabilities:

Version 3.0

  1. Point Indexing - Creates a point event on the NHDPlus linear feature.
  2. Polygon/Area Intersection Indexing - Creates events from NHDPlus features intersecting with a provided polygon or multipolygon. When indexing a portion of a waterbody having artificial paths not also included in the selection, a point event is created on the closest artificial path.
  3. Traversal Indexing - Creates events between two points by traversing the NHDPlus flowline network using geometric analysis to create connections between NHDPlus features. Due to the intensive calculations and potential for the indexer to wander long distances in search of the connection between two points, this indexing type should only be used over small distances or on subsets of the NHDPlus network such as beaches.
  4. Point to Point Indexing - Utilizes the Upstream/Downstream Search Service to select all intervening features between two points. The points must occur on traversable linear NHDPlus features and be upstream or downstream of each other.
  5. Upstream Mainline Indexing - Utilizes the Upstream/Downstream Search Service to select all NHDPlus features upstream along the NHDPlus defined mainline of the flow. Use the flow distance and flow time parameters to limit the amount of features chosen in the traversal.
  6. Upstream with Tributaries Indexing - Utilizes the Upstream/Downstream Search Service to select all NHDPlus features upstream. Use the flow distance and flow time parameters to limit the amount of features chosen in the traversal.
  7. Downstream Mainline Indexing - Utilizes the Upstream/Downstream Search Service to select all NHDPlus features downstream along the NHDPlus defined mainline of the flow. Use the flow distance and flow time parameters to limit the amount of features chosen in the traversal.
  8. Downstream with Divergences Indexing - Utilizes the Upstream/Downstream Search Service to select all NHDPlus features downstream. Use the flow distance and flow time parameters to limit the amount of features chosen in the traversal.

The output is a standardized event object intended to be ready for loading in the Reach Address Database. The service currently only returns the point, line and area events. The user is expected to load the metadata objects with the proper information regarding the indexing process before submission.

Top of Page


Usage Scenarios

Nonpoint Source Grants

Problem Statement: Need to collect the spatial extent of nonpoint source grant projects and allow them to be easily discovered by network upstream/downstream traces and other NHDPlus tools.

Desired Information: NHDPlus RAD standard event table records based on a user defined, heads up digitized or HUC boundary selected area.

Information Returned from Service: NHDPlus line and area event records for the user defined area.

Beach Indexing

Problem Statement: Need to collect normalized beach location and size information from each beach manager and store the results in the Reach Address Database.

Desired Information: Reach Address Database standard event table records based on either a user selecting the endpoints of the beach or from user collected points representing the endpoints of the beach.

Information Returned from Service: NHDPlus line event records for coastline NHDPlus reaches only which correspond to the coastline between the two endpoints.

Code Samples

Top of Page


Input Parameters

Attributes of the nhd_indexing_input object

Parameter Datatype Description
pBatchId Number Meaningful identification number for the indexing submission. All batch parameters are repeated in the output object.
pBatchName String Meaningful identification name for the submission.
pBatchDate String Meaningful date related to the submission.
pBatchDateMod String Modifier explaining the pBatchDate complex object. See the complex object modifier descriptions for more information.
pBatchProgram Integer Integer value indicating the program for which the batch of events has been created. See RAD Programs for values of each program.
pBatchComments String Comments related to the submission.
pBatchSmdate  String Date of the most current reachsmdate to be used as a check in the future to make sure the index submitter and the indexing service are using the same NHDPlus version.
pBatchSmdateMod String Modifier explaining the pBatchSmdate complex object. See the complex object modifier descriptions for more information.
pBatchResolution Number Numeric integer of the NHDPlus resolution to be used. For medium resolution NHDPlus this will always be 3 while high resolution is indicated with a 2.
pSourceOriginator  String Abbreviated name of the organization submitting the event.
pSourceDatadesc String Attribute value being indexed.
pSourceFeatureid String The critical source_featureid key used to tie the indexing submission events to records in the source program database.
pFeaturedetailurl String The featuredetailurl value to use for the event.
pComidBase Number The starting value from which the comid of events will be sequentially numbered.
pCycleYear String For programs using a cycle year.
pStartDate String For programs using a start date.
pStartDateMod String Modifier explaining the pStartDate complex object. See the complex object modifier descriptions for more information.
pEndDate String For submitting events which are historical and no longer current.
pEndDateMod String Modifier explaining the pEndDate complex object. See the complex object modifier descriptions for more information.
pIndexingType String

Keyword indicating the type of indexing to perform. If left empty, the indexer will try to guess the indexing type desired based on the input geometry type.
Current valid values are:

  • polygon
  • point
  • traversal
  • point2point
  • upstream_main
  • upstream_tribs
  • downstream_main
  • downstream_divs
pInputGeometry String The geometry used for indexing. Polygon indexing requires a polygon or multipolygon, point indexing requires a single point while point2point indexing requires a two element multipoint. Geometry must utilize Oracle SRID 8265 or 4269 to match NHDPlus standards.
pInputGeometryMod String Modifier explaining the geometry format used in pInputGeometry. See the complex object modifier descriptions for more information.
pReachSelectionLower Number Lower threshold for pruning a reach during indexing. A lower threshold of 10 would require the indexing process to ignore any reaches where under 10% of the reach has been selected.
pReachSelectionUpper Number Upper threshold for expanding the selection to the entire reach. An upper threshold of 90 would require the indexing process to include the complete reach if at least 90% of the reach was selected.
pFeatureSelection String 'CLIP', 'WHOLE_FLWB' or 'WHOLE_REACH' flag indicating whether returned events will be clipped to the indexing object, return whole flowlines and/or waterbodies or return whole reaches. The default value is 'CLIP'.
pFeatureType String 'BOTH', 'FLOWLINE' or 'WATERBODY' flag indicating whether the indexing selection will return flowlines or waterbodies exclusively. This flag is meant for specific programs like BEACHES which do not include specific reach categories such as waterbodies. The default value is 'BOTH'.
pFcodeAllow String Array of one or more fcodes to allow in the indexing output. The default value is a NULL array.
pFcodeAllowMod String Modifier explaining the array format used in pFcodeAllow. See the complex object modifier descriptions for more information.
pFcodeDeny String Array of one or more fcodes to exclude from the indexing output. The default value is a NULL array.
pFcodeDenyMod String Modifier explaining the array format used in pFcodeDeny. See the complex object modifier descriptions for more information.
pFlowDistance Number Maximum distance traversed in kilometers for selecting features using Upstream/Downstream Search services.
pFlowTime Number Maximum flow time traversed in hours for selecting features using Upstream/Downstream Search services.
pTraverseDistance Number Maximum distance a traversal indexing action will travel before stopping. The default value is 50 KM.
pTraverseTolerance Number Distance in KM to use when making connections between flowlines. Intended to be used in cases where NHDPlus features are not correctly touching. The default value is 0 meaning it should be used only in special circumstances.
pTraverseFcodeAllow String Array of one or more fcodes to include in the indexing output. The default value is a NULL array.
pTraverseFcodeAllowMod String Modifier explaining the array format used in pTraverseFcodeAllow. See the complex object modifier descriptions for more information.
pTraverseFcodeDeny String Array of one or more fcodes to exclude from the indexing output. The default value is a NULL array.
pTraverseFcodeDenyMod String Modifier explaining the array format used in pTraverseFcodeDeny. See the complex object modifier descriptions for more information.

Additional parameters specific to HTTP services are listed in the WATERS HTTP Services documentation.

Top of Page


Output Return Object

nhd_indexing_point object

Column Datatype Description
comid Number The comid of event record. This is an unique integer identifying the record. Note this is not related to the comid of any NHDPlus feature.
eventdate String The date the event was created or updated. This value is taken from the batch_date attribute in input object.
event_type String Integer value indicating the program for which the event has been created. See RAD Programs for values of each program.
reachcode String The reach code value of the NHDPlus hydrologic feature the event occurs upon. This value is derived from the NHDPlus record used in indexing the event.
reachsmdate String Date that the NHDPlus reach code was assigned thus tying the event to a specific version of NHDPlus. This value is derived from the reachsmdate stored in the nhdreachcode_comid table of the NHDPlus dataset used in indexing.
reachresolution String Value indicating the resolution of the NHDPlus feature the event occurs upon. This value is derived from the reachresolution value in the input object.
featurecomid String Value derived from the featurecomid field in the input object.
featureclassref String Value derived from the featureclassref field in the input object.
source_originator String Abbreviated name of the organization submitting the event. Value derived from the source_originator field in the input object.
source_datadesc String Attribute value being indexed. Value derived from the source_datadesc field in the input object.
source_featureid String Foreign key to external program database. Value derived from the source_datadesc field in the input object.
featuredetailurl String Value derived from the featuredetailurl field in the input object.
offset Number Unimplemented/Unused locational feature which could be used to move events a given distance left or right of a linear hydrology feature.
measure Number The measure of the point event on the linear hydrology reach feature.
cycle_year String The cycle year of the event data being submitted.
start_date String The start date of the event data being submitted.
end_date String The end date of the event data being submitted.
shape String The geometry of the event.
objectid String A unique integer identifying the record.
nhd_indexing_line Array of Object Object Type: nhd_indexing_line
nhd_indexing_area Array of Object Object Type: nhd_indexing_area
nhd_indexing_evt2meta Array of Object Object Type: nhd_indexing_evt2meta
nhd_indexing_metadata Array of Object Object Type: nhd_indexing_metadata

nhd_indexing_line object

Column Datatype Description
comid Number The comid of event record. This is an unique integer identifying the record. Note this is not related to the comid of any NHDPlus feature.
eventdate String The date the event was created or updated. This value is taken from the batch_date attribute in input object.
event_type String Integer value indicating the program for which the event has been created. See RAD Programs for values of each program.
reachcode String The reach code value of the NHDPlus hydrologic feature the event occurs upon. This value is derived from the NHDPlus record used in indexing the event.
reachsmdate String Date that the NHDPlus reach code was assigned thus tying the event to a specific version of the NHDPlus. This value is derived from the reachsmdate stored in the nhdreachcode_comid table of the NHDPlus dataset used in indexing.
reachresolution String Value indicating the resolution of the NHDPlus feature the event occurs upon. This value is derived from the reachresolution value in the input object.
featurecomid String Value derived from the featurecomid field in the input object.
featureclassref String Value derived from the featureclassref field in the input object.
source_originator String Abbreviated name of the organization submitting the event. Value derived from the source_originator field in the input object.
source_datadesc String Attribute value being indexed. Value derived from the source_datadesc field in the input object.
source_featureid String Foreign key to external program database. Value derived from the source_datadesc field in the input object.
featuredetailurl String Value derived from the featuredetailurl field in the input object.
offset Number Unimplemented/Unused locational feature which could be used to move events a given distance left or right of a linear hydrology feature.
fmeasure Number The start measure of the point event on the linear hydrology reach feature.
tmeasure Number The end measure of the point event on the linear hydrology reach feature.
shape_length Number The length of line event feature in meters.
cycle_year String The cycle year of the event data being submitted.
start_date String The start date of the event data being submitted.
end_date String The end date of the event data being submitted.
shape String The geometry of the event.
objectid String A unique integer identifying the record.

nhd_indexing_area object

Column Datatype Description
comid Number The comid of event record. This is an unique integer identifying the record. Note this is not related to the comid of any NHDPlus feature.
eventdate String The date the event was created or updated. This value is taken from the batch_date attribute in input object.
event_type String Integer value indicating the program for which the event has been created. See RAD Programs for values of each program.
reachcode String The reach code value of the NHDPlus hydrologic feature the event occurs upon. This value is derived from the NHDPlus record used in indexing the event.
reachsmdate String Date that the NHDPlus reach code was assigned thus tying the event to a specific version of the NHDPlus. This value is derived from the reachsmdate stored in the nhdreachcode_comid table of the NHDPlus dataset used in indexing.
reachresolution String Value indicating the resolution of the NHDPlus feature the event occurs upon. This value is derived from the reachresolution value in the input object.
featurecomid String Value derived from the featurecomid field in the input object.
featureclassref String Value derived from the featureclassref field in the input object.
source_originator String Abbreviated name of the organization submitting the event. Value derived from the source_originator field in the input object.
source_datadesc String Attribute value being indexed. Value derived from the source_datadesc field in the input object.
source_featureid String Foreign key to external program database. Value derived from the source_datadesc field in the input object.
featuredetailurl String Value derived from the featuredetailurl field in the input object.
shape_area Number The area of line event feature in square kilometers.
cycle_year String The cycle year of the event data being submitted.
start_date String The start date of the event data being submitted.
end_date String The end date of the event data being submitted. 
shape String The geometry of the event.
objectid String A unique integer identifying the record.

nhd_indexing_evt2meta object

Column Datatype Description
comid Number Unique numeric identification number for the event.
duuid Number Unique numeric identification number for the metadata record.

nhd_indexing_metadata object

Column Datatype Description
duuid Number Unique numeric identification number for the metadata record.
processdescription String Process used to create the event data.
processdate String Date the event data was processed.
attributeaccuracyreport String Attribute accuracy of event data.
logicalconsistencyreport String Logical consistency of event data.
completenessreport String Completeness description of event data.
horizpositionalaccuracyreport String Horizontal positional accuracy of event data.
vertpositionalaccuracyreport String Vertical positional accuracy of event data.
metadatastandardname String Metadata standard name.
metadatastandardversion String Metadata standard version.
metadatadate String Date metadata records was created or modified.
datasetcredit String Credit for the dataset.
contactorganization String Name of the organization responsible for the metadata record.
addresstype String Type of address given (mail/physical).
address String Address of contact person.
city String City of contact person.
stateorprovince String State of contact person.
postalcode String Zip Code or Postal Code of contact person.
contactvoicetelephone String Phone number of contact person.
contactinstructions String Special instructions for the contact person.
contactemailaddress String Email Address of contact person.

The output format for this service is JSON with GEOJSON formatted geometries.

Top of Page


HTTP Service

Resource Location
Runtime
Endpoint
https://ofmpub.epa.gov/waters10/EventIndexing.Service

Top of Page


Database Service

Database
Instance
Schema Resource
WATERS10 NHDPLUS_INDEXING EVENT_INDEXING.INDEXER

Users with schema accounts on the EPA waters10 database instance may directly access the Event Indexing Service engine via a stored procedure interface. Input and output is managed via the objects described below. Callers need to create, submit, receive and interpret these objects for their own needs. Note that the upstream/downstream service code utilizes internal DDL statements such that the Event Indexing Service must be called as a PL/SQL procedure rather than embedded as a function within SQL.

Top of Page


Changelog

Version: 3.0 - Released: February 03, 2014

  • SOAP version of the service decommissioned.

Version: 2.0 - Released: August 31, 2009

  • Initial Release of HTTP Services and updated web page content.

Top of Page