Count NHDPlus HR Features at Geometry
hydro_count_featuresCount hydrographic features (streams, lakes, gages, etc.) intersecting a given point or GeoJSON geometry. Use it to estimate result size before running detailed feature queries, avoiding large data transfers.
Instructions
Return ONLY how many features of a layer intersect a point or geometry (size check).
Use before the find_* tools to gauge result size without fetching full attributes -- useful for large polygons or densely mapped areas. A count of 0 means the geometry is outside coverage or has no features of that type.
Returns: { "count": int, "layer": str, "query_geometry": {"type": str, "crs_epsg": int}, "provenance": {...} }
Error responses:
"Error: supply either lat+lon or geometry, not both (or neither)"
"Error: unsupported geometry type ..."
"Error: NHDPlus HR request failed: ..."
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | No | Latitude in decimal degrees (WGS84). Use with 'lon'. Omit when supplying 'geometry'. | |
| lon | No | Longitude in decimal degrees (WGS84). Use with 'lat'. Omit when supplying 'geometry'. | |
| layer | Yes | Which feature layer to count. One of: 'waterways' (flowlines), 'waterbodies', 'areas', 'gages', 'points', 'lines', 'watershed'. | |
| geometry | No | GeoJSON geometry object as a JSON string. Supported types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, or BoundingBox shorthand {"type": "BoundingBox", "bbox": [minLon, minLat, maxLon, maxLat]}. All coordinates must be WGS84 decimal degrees. Supply either this OR lat+lon, not both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||