Jump to main content.


Navigation Service

Description

The Navigation service is a subset component of the Upstream/Downstream service designed to provide standard stream network traversal.  The traversal request may include a description of where, on the stream network, to begin the traversal, and a description of where or how to end the traversal.  All Upstream/Downstream executions require a navigation type and at least one start point.  All other input parameters are optional. 

Usage Scenarios

Drinking Water Designated Use Evaluation

Problem Statement

Determine if the waters upstream from a drinking water intake have the proper designated use assigned to them.

Desired Information

List of all waters within 50 miles upstream of all drinking water intakes that have a designated use different from drinking water supply.

Information Returned from Service

Event tables of waters 50 miles upstream of each drinking water intake.

NOTE: The results of this service will need to be overlaid with the assessed waters layer and joined to the ATTAINS database to complete the analysis.

 

Input

Parameters

Parameter Datatype Description
pNavigationType String 'UM' for upstream mainstem navigation
'UT' for upstream with tributaries navigation
'DM' for downstream mainstream navigation
'DD' for downstream with divergences navigation
'PP' for point-to-point navigation
pStartComid Number NHD flowline comid to begin navigating from. Must be greater than 0 and less than 999999999.
pStartReachcode String NHD reach code to begin navigating from. User must provide either a comid or a reach code. If both are provided, then the comid takes precedence.
pStartMeasure Number Measure on the NHD reach code to begin navigating from. Must be between 0 and 100 inclusive, or NULL. A value of null means that a measure will be calculated to be either the bottom or the top of the NHD flowline. (depending on whether the navigation type is upstream or downstream and whether it is a start or stop measure).
pStopComid Number NHD flowline comid to stop navigating at. Must be greater than 0 and less than 999999999.
pStopReachcode String NHD reach code to stop navigating at. User must provide either a comid or a reach code. If both are provided, then the comid parameter takes precedence.
pStopMeasure Number Measure on the NHD reach code to stop navigating at. Must be between 0 and 100 inclusive, or NULL.
pMaxDistance Number Distance in KM to navigate. If neither pMaxDistance or pMaxTime are provided, then distance to travel defaults to 50 km.
pMaxTime Number Time of travel in hours to navigate.

HTTP Service Notes

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

SOAP Service Notes

The parameter listing for SOAP services is slightly different.  Array parameters are not followed by a "mod" parameter as the array format is specified by the WSDL documentation.  For SOAP services, the input geometry parameter is always OGC Well-Known Text (WKT) and thus the secondary "mod" parameter is simply a numeric value of the Oracle Spatial Reference ID.

Output

UML Diagram

Navigation Service UML

Return Object

navigation_service_output

Property Datatype Description
return_code Number Return Code indicate success or failure of the navigation process.
  0 = Up/Down Service completed as requested
  1nn= Interpreter errors
  2nn= Resolver errors
  3nn=Traverser errors
  4nn=Pruner errors
  5nn=Outputer errors
  999=General error
status_message String Status message provides text details for return codes 1nn thru 5nn.
ntnavresultsstandard Array of Object Object Type: updn_nttypenavresultsstandard

Supporting Objects

updn_recnavresultsstandard object

Property Datatype Description
comid Number NHD flowline comid.
reachcode String NHD reach code.
frommeas Number NHD reach code beginning measure.
tomeas Number NHD reach code ending measure.
totaldist Number Total distance of the flowline in KM for the traversal.
totaltime Number Total navigation time of the flowline in hours for the traversal.
hydroseq Number The hydrologic sequence of the flowline in the total traversal.
shape Geometry Geometry of the feature.

HTTP Service Notes

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

SOAP Service Notes

The SOAP service does not return any geometries with results.

Javascript Library

Function Name
WATERS.Services.NavigationService

HTTP Service

Web Service (SOAP)

Database Service

Database Instance Schema Resource
WATERS10 ow_service updn_main.main_navigation_srv

Database Service Example

Users with schema accounts on the EPA waters10 database instance may directly access the upstream/downstream service 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 indexing service must be called as a PL/SQL procedure rather than embedded as a function within SQL.

-- Create a table to hold your results
CREATE TABLE up_downstream_nav_results (input CLOB, output CLOB);

-- Run the upstream/downstream service
DECLARE
   obj_output   ow_service.updn_objNavigationOutput;
   clb_output   CLOB;
   
BEGIN

   -----------------------------------------------
   -- Step 1
   -- Run the database service
   -----------------------------------------------
   obj_output := ow_service.updn_main.main_navigation_srv(
      'PP',
      12169311,
      NULL,
      97,
      12169213,
      NULL,
      50,
      NULL,
      NULL,
      'FALSE',
      0.001  
   );
   
   -----------------------------------------------
   -- Step 3
   -- Serialize the output into a CLOB
   -----------------------------------------------
   clb_output := XMLTYPE(obj_output).getClobVal();
   
   -----------------------------------------------
   -- Step 4
   -- Pop values into the table
   -----------------------------------------------
   EXECUTE IMMEDIATE
   'INSERT INTO up_downstream_nav_results VALUES(NULL,:p01)'
   USING clb_output;
   COMMIT;
                    
END;
                    
-- Then inspect the results in the up_downstream_nav_results table.
-- Note that empty attributes and child objects will not be represented in the serialized XML.

Changelog

Version: 2.0 - Released: August 31, 2009

  • Initial Release of SOAP and HTTP Service for this component

     


  • Local Navigation


    Jump to main content.