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 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 »

Spatial Assignment Service


The Spatial Assignment Service is a support service allowing users to associate spatial information with reference layers stored in WATERS. The intention of the service is not to report or analyze all interactions with the reference layer but rather to assign a single result. Provided parameters allow several means to resolve multiple matches including hinting via parameters, spatial analysis, distance analysis or simple arbitrary choice.

Top of Page

Code Samples

Top of Page

Input Parameters

Parameter Datatype Description
pGeometry Number Input geometry. May be any valid geometry. All spatial analysis is perform in two-dimensional space with any other dimensions ignored.
pGeometryMod String Modifier explaining the input geometry. See the complex object modifier descriptions for more information.
pLayer String

Geospatial layer in WATERS to use as the assignment source. Current valid values include:

  • NHDPLUS_CATCHMENT - returns NHDPlus comid numeric identifier.
  • WBD_HUC12 - returns twelve-byte unit code.
  • WBD_HUC10 - returns ten-byte unit code.
  • WBD_HUC8 - returns eight-byte unit code.
  • WBD_HUC6 - returns six-byte unit code.
  • WBD_HUC4 - returns four-byte unit code.
  • WBD_HUC2 - returns two-byte unit code.
  • LEGACY_HUC8 - returns eight-byte unit code.
  • LEGACY_HUC6 - returns six-byte unit code.
  • LEGACY_HUC4 - returns four-byte unit code.
  • LEGACY_HUC2 - returns two-byte unit code.
  • TIGER_STATE - returns two-byte postal state abbreviation.
  • TIGER_COUNTY - returns five-digit FIPS county identification code.
  • TIGER_ZCTA5 - returns five-digit ZipCode Tabulation Area code.
pAssignmentHint String In cases where the input geometry intersects more than one candidate feature, providing a hint can force the choice. While rare, a point geometry may fall exactly on the border between two candidates. If users have access to any supplemental information that may argue one way or the other, provide that information in the hint parameter. The hint must be the same value as that returned by the layer. See the pLayer parameter for the list of values returned by each layer. In the absence of a hint or in the case where the hint does not equal any candidates, the result will be either an arbitrary choice for point geometries or depending on the pWeighExtents flag will be arbitrary or based on percentage of intersection for line and polygon geometries. 
pWeighExtents String 'TRUE' or 'FALSE' flag whether to analyze line and area geometry intersections to determine the best candidate. If TRUE, the intersection of the input geometry and each candidate will examined and the candidate intersecting the largest percentage of the input geometry will be chosen. In the case of percentage of intersection resulting in equal coverage amounts, the candidate closest to the centroid of the input geometry will be returned. The coverage percentage will be returned in the output results. The default value is 'TRUE' and note again this parameter has no effect when the input geometry is a point.
pSpatialSnap String 'TRUE' or 'FALSE' flag indicating whether to return the nearest assignment candidate when no candidate intersects the input geometry. When a spatial snap is utilized to return a value, the return coverage percentage will be -9999. The default value is FALSE.
pSpatialSnapMaxKM Number When using the spatial snap option, a limit in KM beyond which no candidates will be collected.
pReturnGeometry String 'TRUE' or 'FALSE' flag indicating whether to return the assignment geometry in the results. Do not use this option unless you have a need to display or analyze the resulting geometry. The default value is FALSE.

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

Top of Page

Output Return Object


Parameter Datatype Description
layer_type String Layer in WATERS used as the assignment source. This is the same as the input parameter pLayer.
assignment_value String The result of the assignment. See the input parameter pLayer above for details on what values are returned for each layer.
coverage_percentage Number The numeric value of the percentage of the input geometry intersecting the assignment result. A value of -9999 indicates that a spatial snap occurred.
vertices Number Count of vertices in the assignment geometry.
shape Geometry Optional output of the assignment geometry.

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

Top of Page

HTTP Service

Resource Location

Top of Page

Database Service

Users with schema accounts on the EPA waters10 database instance may directly access the service via a stored procedure interface. Callers need to create, submit, receive and interpret service objects for their own needs.

Schema Resource

Top of Page


Version: 3.0 - Released: February 03, 2014

  • SOAP version of the service decommissioned.

Version: 1.0 - Released: July 9, 2010

  • Initial release of service and web page content

Top of Page