Total Waters Oracle Service Public Methods
General Description
Purpose:
To return calculated totals of point counts, linear meters, and area sq km for NHD and Program data. Depending on the bounding parameters, this information may be calculated on the fly, or pulled from pre-calculated tables. The interface has several options for summarization, including "Border Waters", custom shapes, and FCODE groupings.
Process:
The procedures listed below should be called through ORACLE PL /SQL. For all procedures, the results are returned via a PL/SQL Ref Cursor.
Any Errors can be retrieved from the PL/SQL call stack using either DBMS_UTILITY.FORMAT_ERROR_STACK or DBMS_UTILITY.FORMAT_ERROR_BACKTRACE. DBMS_UTILITY.FORMAT_ERROR_STACK retrieves the error number and verbal description of the error while DBMS_UTILITY.FORMAT_ERROR_BACKTRACE retrieves the error number and the line location where the error occurred. The latter may be more valuable when reporting problems.
Bounding Box
|
Method Name |
total_waters.tw_bounding_box.process_job |
||||||||||||||||||||||||||||||||||||||||||||
|
Description |
This is the main entry-level procedure that is takes a bounding box specification and returns rolled up counts/sums of the program systems desired, including NHD. |
||||||||||||||||||||||||||||||||||||||||||||
|
Input Parameters |
|
||||||||||||||||||||||||||||||||||||||||||||
| Output Parameters |
Data
is available from the temporary results table (directly). Data is also
returned via an Oracle Ref Cursor. The ref cursor returns all the rows
from the
results table for that transaction.
|
||||||||||||||||||||||||||||||||||||||||||||
|
Cursor Field Definitions |
|
||||||||||||||||||||||||||||||||||||||||||||
|
Data Sources |
Event
Tables (point/line/area custom point/ custom line/ custom area) for
each Program System NHD tables (linear/area). |
||||||||||||||||||||||||||||||||||||||||||||
|
Process Notes |
Proper privledges via the tw_user role must
be granted to any user attempting to run the bounding
box portion of the TW Service against resticted event programs. |
||||||||||||||||||||||||||||||||||||||||||||
|
PL/SQL Example |
**Note that there may be issues with the dbms_output of the Ref Cursor. Depending on the number of records returned a buffer overflow error may occur. A set serveroutput on size 999999 may help alleviate the issue. Also a change to a dbms_output for each column as opposed to a single dbms_output statement should circumvent buffer overflow errors. DECLARE |
||||||||||||||||||||||||||||||||||||||||||||
|
Usage Notes/ Limitations |
The Bounding box must be defined by the Lat/Long of bottom left to upper right. The data is only broken down by State Geography (with or without border waters), HUC, and/or FCODE. Custom event data summaries are currently not implemented.
|
State/HUC/FCODE
|
Method Name |
total_waters.tw_state_huc_fcode.process_job |
||||||||||||||||||||||||||||||||||||||||
|
Description |
This
is the main entry-level procedure that will return total point event
counts, total linear waters (meters), and total area waters (square
kilometers) summarized by state and/or sub basin (8 digit HUC). Results
can be returned for program data as
well as the NHD. |
||||||||||||||||||||||||||||||||||||||||
|
Input Parameters |
|
||||||||||||||||||||||||||||||||||||||||
| Output Parameters |
Data is available from the temporary results table (directly). Data is also returned via an Oracle Ref Cursor. The ref cursor returns all the rows from the results table for that transaction. Results table: TW_TEMP_BB_RESULTS The data in the Temp tables (results,etc.) will remain until the session is closed, or manually deleted. If separate independent analysis for a new set of data is to be run, then it is recommended to start a new session.
|
||||||||||||||||||||||||||||||||||||||||
|
Cursor Field Definitions |
|
||||||||||||||||||||||||||||||||||||||||
|
Data Sources |
Pre-computed data for point/line/area, both NHD and Event systems |
||||||||||||||||||||||||||||||||||||||||
|
Process Notes |
Rolls up data from the pre-computed tables based on parameters. The tw_user role must be granted to any user attempting to run the st_huc_fcode rollup portion of the TW Service. |
||||||||||||||||||||||||||||||||||||||||
|
PL/SQL |
This example returns a rollup of NHD, 303D, and 305B data for MD and VA, broken out by State, border waters, and HUC, and grouping by INT_PEREN fcode groupings. Note that the huc array is commented out. DECLARE |
||||||||||||||||||||||||||||||||||||||||
|
Usage Notes/Limitations |
The data is only broken down by State Geography (with or without border waters), HUC, and/or FCODE. Custom event data summaries are currently not implemented. |
![[logo] US EPA](http://www.epa.gov/epafiles/images/logo_epaseal.gif)