GNIS Name Service
Description:
-
Advanced query function for locating NHD
features using the USGS GNIS database.
Input Parameters:
Parameter | Datatype | Description | |
pFulltext | String | OPT | If executing a fulltext query, the full text of the feature name to search for. Case is ignored. |
pFulltextRegex | String | OPT |
Any regular expression modifiers when executing a regular expression query. |
pBasename | String | OPT | If executing a composite query, the basename of the feature name to search for. Case is ignored. |
pBasenameRegex | String | OPT | Any regular expression modifiers when executing a regular expression query. |
pHydrography | String | OPT | If executing a composite query, the hydrology name of the feature to search for. Case is ignored. |
pHydrographyRegex | String | OPT | Any regular expression modifiers when executing a regular expression query. |
pDirectional | String | OPT | If executing a composite query, the directional part of the feature name to search for. Case is ignored. |
pDirectionalRegex | String | OPT | Any regular expression modifiers when executing a regular expression query. |
pOperator | String | OPT | ‘EQ’, ‘LIKE’,’REG_EX’ or ‘JARO’ indicating the type of query to execute. Note that REG_EX and JARO queries do not utilize table indexes and may take a very long time to return results. Default value is ‘EQ’. |
pQueryType | String | OPT | ‘FULLNAME’ or ‘COMPOSITE’ indicating which type of text matching query to execute. Default value is to examine pFullname and execute FULLNAME query if a value is provided. |
pQueryLimit | Number | OPT | Numeric value to halt returning results at. Default is no limit. |
pJwthreshold | Number | OPT | Numeric value of the Jaro Winkler text matching algorithm if executing a Jaro Winkler text match. Default is 90. |
pResolution | Number | OPT | 0,1,2,3 values. 0 indicates examine all resolutions. 1 indicates examine local resolution NHD only. 2 indicates examine high resolution NHD only. 3 indicates examine medium resolution NHD only. |
pSourceTable | Array of String | OPT | Any of the values ‘nhdpoint’, ‘nhdline’, ‘nhdarea’, ‘nhdflowline’ or ‘nhdwaterbody’ to limit queries to specific NHD tables. |
pState | Array of String | OPT | Any postal abbreviation to limit queries to the primary state value listed in the USGS gnis_id records. |
pCountyFips5 | Array of String | OPT | Any FIPS5 numeric value of a US county. Used to limit queries to the primary county value listed in the USGS gnis_id records. |
pSubbasin | Array of String | OPT | Any 8 digit numeric value representing a HUC8 or subbasin in the NHD. Used to limit queries to specific NHD subbasins. |
pGnisClass | Array of String | OPT | Any string value used to limit queries to the feature_type values listed in the USGS gnis_id records. |
pFtype | Array of String | OPT | Any string value used to limit queries to the ftype values in the NHD records. |
pBreakBySubbasin | String | OPT | ‘Y/N’ flag to group results by unique NHD subbasins. |
pBreakByFcode | String | OPT | ‘Y/N’ flag to group results by unique NHD fcodes. |
Sample SOAP Request (Oracle 10.2.0.2 OC4J):
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://epadev.induscorp.com/WATERSWebServices/OWServices"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>
<SOAP-ENV:Body>
<ns1:nameService>
<pFulltext xsi:type="xsd:string">bass LAK%</pFulltext>
<pFulltextRegex xsi:type="xsd:string" xsi:nil="true"/>
<pBasename xsi:type="xsd:string" xsi:nil="true"/>
<pBasenameRegex xsi:type="xsd:string" xsi:nil="true"/>
<pHydrography xsi:type="xsd:string" xsi:nil="true"/>
<pHydrographyRegex xsi:type="xsd:string" xsi:nil="true"/>
<pDirectional xsi:type="xsd:string" xsi:nil="true"/>
<pDirectionalRegex xsi:type="xsd:string" xsi:nil="true"/>
<pOperator xsi:type="xsd:string">LIKE</pOperator>
<pQueryType xsi:type="xsd:string" xsi:nil="true"/>
<pQueryLimit xsi:type="xsd:decimal" xsi:nil="true"/>
<pJwthreshold xsi:type="xsd:decimal" xsi:nil="true"/>
<pResolution xsi:type="xsd:decimal">2</pResolution>
<pSourceTable
xsi:nil="true"
xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[0]"
/>
<pState
xmlns:ns1="http://waters-waters/OWServices.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns1:waters_waters_Genstringsequence"
>
<array
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[1]"
>
<string xsi:type="xsd:string">WI</string>
</array>
</pState>
<pCountyFips5
xmlns:ns1="http://waters-waters/OWServices.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns1:waters_waters_Genstringsequence"
>
<array
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[1]"
>
<string xsi:type="xsd:string">55107</string>
</array>
</pCountyFips5>
<pSubbasin xsi:nil="true" xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[0]"/>
<pGnisClass
xsi:nil="true"
xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[0]"
/>
<pFtype xsi:nil="true" xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[0]"/>
<pBreakBySubbasin xsi:type="xsd:string" xsi:nil="true"/>
<pBreakByFcode xsi:type="xsd:string" xsi:nil="true"/>
</ns1:nameService>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Output Object:
Attributes of the namesrv_output object |
||
Column | Datatype | Description |
results | ARRAY OF OBJECT | Oracle object namesrv_results, see below. |
Attributes of the namesrv_results object |
||
featureId | VARCHAR2(10) | the gnis_id of the result record |
featureName | VARCHAR2(254) | the gnis_name of the result record |
featureClass | VARCHAR2(254) | the gnis feature class of the result record |
primaryState | VARCHAR2(2) | the 2 byte primary state abbreviation of the result record as defined by gnis |
primaryStateFips | VARCHAR2(2) | the 2 byte FIPS code of the primary state as defined by gnis |
primaryCounty |
VARCHAR2(254) | the primary county name of the result record as defined by gnis |
primaryCountyFips | VARCHAR2(3) | the 3 bytes FIPS code of the primary county as defined by gnis |
gnisPrimaryStem | VARCHAR2(512) | the primary basename or stem of the gnis name |
gnisPrimaryHydro | VARCHAR2(512) | the primary hydro name of the gnis name |
gnisPrimaryDir | VARCHAR2(512) | the primary directional value of the gnis name |
gnisSecondaryStem | VARCHAR2(512) | the secondary basename or stem of the gnis name (if any) |
gnisSecondaryHydro | VARCHAR2(512) | the secondary hydro name of the gnis name |
gnisSecondaryDir | VARCHAR2(512) | the secondary directional value of the gnis name |
gnisCentroid | VARCHAR2(2000) | the centroid of the result record as defined by gnis in GML |
resolution | NUMBER | ‘2/3’ the resolution of the NHD records with 2 = high resolution and 3 = medium resolution |
sourceSchema | VARCHAR2(30) | the schema holding the source NHD records in the RAD (for lookup) |
sourceTable | VARCHAR2(30) | the table holding the source NHD records in the RAD (for lookup) |
subbasin | VARCHAR2(8) | the HUC8 or subbasin value of the NHD records (if any) |
ftype | VARCHAR2(24) | the ftype of the matching NHD records |
fcode | NUMBER(5) | the fcode of the matching NHD records |
nhdMbr | VARCHAR2(2000) | the maximum bounding rectangle of the matching NHD records in GML. Note that in the case that the matching NHD record is a single point, that point will be stored in this field |
Sample Soap Response:
<?xml
version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:nameServiceResponse
xmlns:ns1="http://epadev.induscorp.com/WATERSWebServices/OWServices"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return
xmlns:ns2="http://waters-waters/OWServices.xsd"
xsi:type="ns2:waters_waters_NamesrvOutputUser">
<results
xsi:type="ns2:waters_waters_NamesrvList">
<array
xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:Array"
ns3:arrayType="ns2:waters_waters_NamesrvResultsUser[4]">
<item xsi:type="ns2:waters_waters_NamesrvResultsUser">
<primaryCountyFips
xsi:type="xsd:string">107</primaryCountyFips>
<gnisSecondaryHydro xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryHydro>
<primaryState xsi:type="xsd:string">WI</primaryState>
<sourceTable
xsi:type="xsd:string">nhdwaterbody</sourceTable>
<primaryCounty xsi:type="xsd:string">RUSK</primaryCounty>
<gnisPrimaryStem
xsi:type="xsd:string">BASS</gnisPrimaryStem>
<featureClass xsi:type="xsd:string">LAKE</featureClass>
<primaryStateFips
xsi:type="xsd:string">55</primaryStateFips>
<fcode xsi:type="xsd:decimal" xsi:nil="true"></fcode>
<resolution xsi:type="xsd:decimal">2</resolution>
<gnisSecondaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryDir>
<gnisCentroidGeom xsi:type="xsd:string"><gml:Point
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.255153,45.4052423
</gml:coordinates></gml:Point></gnisCentroidGeom>
<gnisSecondaryStem xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryStem>
<gnisPrimaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisPrimaryDir>
<featureId xsi:type="xsd:string">01561239</featureId>
<subbasin xsi:type="xsd:string" xsi:nil="true"></subbasin>
<featureName xsi:type="xsd:string">BASS LAKE</featureName>
<sourceSchema xsi:type="xsd:string">rad_nhdhi</sourceSchema>
<gnisPrimaryHydro
xsi:type="xsd:string">LAKE</gnisPrimaryHydro>
<ftype xsi:type="xsd:string" xsi:nil="true"></ftype>
<mbrGeom xsi:type="xsd:string"><gml:Box
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.2585257,45.4034602 -91.2517631,45.40750553
</gml:coordinates></gml:Box></mbrGeom>
</item>
<item xsi:type="ns2:waters_waters_NamesrvResultsUser">
<primaryCountyFips
xsi:type="xsd:string">107</primaryCountyFips>
<gnisSecondaryHydro xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryHydro>
<primaryState xsi:type="xsd:string">WI</primaryState>
<sourceTable
xsi:type="xsd:string">nhdwaterbody</sourceTable>
<primaryCounty xsi:type="xsd:string">RUSK</primaryCounty>
<gnisPrimaryStem
xsi:type="xsd:string">BASS</gnisPrimaryStem>
<featureClass xsi:type="xsd:string">LAKE</featureClass>
<primaryStateFips
xsi:type="xsd:string">55</primaryStateFips>
<fcode xsi:type="xsd:decimal" xsi:nil="true"></fcode>
<resolution xsi:type="xsd:decimal">2</resolution>
<gnisSecondaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryDir>
<gnisCentroidGeom xsi:type="xsd:string"><gml:Point
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.4926621,45.4246838
</gml:coordinates></gml:Point></gnisCentroidGeom>
<gnisSecondaryStem xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryStem>
<gnisPrimaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisPrimaryDir>
<featureId xsi:type="xsd:string">01561241</featureId>
<subbasin xsi:type="xsd:string" xsi:nil="true"></subbasin>
<featureName xsi:type="xsd:string">BASS LAKE</featureName>
<sourceSchema xsi:type="xsd:string">rad_nhdhi</sourceSchema>
<gnisPrimaryHydro
xsi:type="xsd:string">LAKE</gnisPrimaryHydro>
<ftype xsi:type="xsd:string" xsi:nil="true"></ftype>
<mbrGeom xsi:type="xsd:string"><gml:Box
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.4980321,45.42136833 -91.4889813,45.4294342
</gml:coordinates></gml:Box></mbrGeom>
</item>
<item xsi:type="ns2:waters_waters_NamesrvResultsUser">
<primaryCountyFips
xsi:type="xsd:string">107</primaryCountyFips>
<gnisSecondaryHydro xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryHydro>
<primaryState xsi:type="xsd:string">WI</primaryState>
<sourceTable
xsi:type="xsd:string">nhdwaterbody</sourceTable>
<primaryCounty xsi:type="xsd:string">RUSK</primaryCounty>
<gnisPrimaryStem
xsi:type="xsd:string">BASS</gnisPrimaryStem>
<featureClass xsi:type="xsd:string">LAKE</featureClass>
<primaryStateFips
xsi:type="xsd:string">55</primaryStateFips>
<fcode xsi:type="xsd:decimal" xsi:nil="true"></fcode>
<resolution xsi:type="xsd:decimal">2</resolution>
<gnisSecondaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryDir>
<gnisCentroidGeom xsi:type="xsd:string"><gml:Point
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.180986,45.5238543
</gml:coordinates></gml:Point></gnisCentroidGeom>
<gnisSecondaryStem xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryStem>
<gnisPrimaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisPrimaryDir>
<featureId xsi:type="xsd:string">01561246</featureId>
<subbasin xsi:type="xsd:string" xsi:nil="true"></subbasin>
<featureName xsi:type="xsd:string">BASS LAKE</featureName>
<sourceSchema xsi:type="xsd:string">rad_nhdhi</sourceSchema>
<gnisPrimaryHydro
xsi:type="xsd:string">LAKE</gnisPrimaryHydro>
<ftype xsi:type="xsd:string" xsi:nil="true"></ftype>
<mbrGeom xsi:type="xsd:string"><gml:Box
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.1837221,45.5213614 -91.17934137,45.5257254
</gml:coordinates></gml:Box></mbrGeom>
</item>
<item xsi:type="ns2:waters_waters_NamesrvResultsUser">
<primaryCountyFips
xsi:type="xsd:string">107</primaryCountyFips>
<gnisSecondaryHydro xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryHydro>
<primaryState xsi:type="xsd:string">WI</primaryState>
<sourceTable
xsi:type="xsd:string">nhdwaterbody</sourceTable>
<primaryCounty xsi:type="xsd:string">RUSK</primaryCounty>
<gnisPrimaryStem
xsi:type="xsd:string">BASS</gnisPrimaryStem>
<featureClass xsi:type="xsd:string">LAKE</featureClass>
<primaryStateFips
xsi:type="xsd:string">55</primaryStateFips>
<fcode xsi:type="xsd:decimal" xsi:nil="true"></fcode>
<resolution xsi:type="xsd:decimal">2</resolution>
<gnisSecondaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryDir>
<gnisCentroidGeom xsi:type="xsd:string"><gml:Point
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.2465473,45.6374617
</gml:coordinates></gml:Point></gnisCentroidGeom>
<gnisSecondaryStem xsi:type="xsd:string"
xsi:nil="true"></gnisSecondaryStem>
<gnisPrimaryDir xsi:type="xsd:string"
xsi:nil="true"></gnisPrimaryDir>
<featureId xsi:type="xsd:string">01561252</featureId>
<subbasin xsi:type="xsd:string" xsi:nil="true"></subbasin>
<featureName xsi:type="xsd:string">BASS LAKE</featureName>
<sourceSchema xsi:type="xsd:string">rad_nhdhi</sourceSchema>
<gnisPrimaryHydro
xsi:type="xsd:string">LAKE</gnisPrimaryHydro>
<ftype xsi:type="xsd:string" xsi:nil="true"></ftype>
<mbrGeom xsi:type="xsd:string"><gml:Box
srsName="SDO:8265"
xmlns:gml="http://www.opengis.net/gml"><gml:coordinates
decimal="." cs="," ts="
">-91.2477607,45.6367776 -91.2450789,45.638629
</gml:coordinates></gml:Box></mbrGeom>
</item>
</array>
</results>
</return>
</ns1:nameServiceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>