API & MCP

Everything a person can do on RavingDesk Watershed & Stream Network (D8 from a DEM), a program or AI agent can do with the same inputs and get the identical result.

HTTP API

RavingDesk Watershed & Stream Network (D8 from a DEM)

Takes your elevation model and a pour point, fills closed depressions with Priority-Flood, routes water with the D8 method, accumulates the upstream area, extracts the stream network with Strahler orders, snaps the pour point to the strongest flow nearby and outlines the watershed that drains through it. Returns the watershed polygon, the streams and the pour point as GeoJSON, a PNG map and basin statistics (area, relief, mean slope, longest flow path, drainage density). It is the hydrology engine of RavingDesk’s Data & charts “Terrain” step.

Inputs of RavingDesk Watershed & Stream Network (D8 from a DEM)
FieldTypeDefaultDescription
filefile—Elevation model (DEM). ESRI ASCII grid (.asc), XYZ grid text, GeoTIFF (Int16, UInt16 or Float32, one band, uncompressed or Deflate, WGS84 or UTM) or a PNG heightmap. Up to 25 MB and 1,048,576 cells.
texttextarea—Or paste an ESRI ASCII grid or XYZ points
crsselect (auto, geographic, utm, local)"auto"Coordinate system of an ASCII or XYZ grid. GeoTIFFs carry their own coordinate system; PNG heightmaps are always local.
utmZonetext—UTM zone. Only for “WGS84 UTM zone”: zone number and N or S.
pngEncodingselect (terrarium, mapbox, grey)"terrarium"PNG heightmap encoding
cellSizenumber—Cell size of a PNG heightmap. PNG heightmaps and TIFFs without georeferencing have no cell size of their own.
greyMinnumber—Elevation of black (grey PNG)
greyMaxnumber—Elevation of white (grey PNG)
pourPoint (required)text"row 72, col 91"Pour point (outlet). A cell (“row 72, col 91”, counted from the top-left), grid coordinates “x, y” on local grids, or a coordinate in any notation on georeferenced grids.
snapRadiusinteger3Snap the pour point within. Moves the pour point to the cell with the largest flow accumulation within this radius, so it lands on the stream.
streamThresholdinteger—Stream threshold. Cells with at least this many upstream cells are streams. Empty: 1 % of the grid, at least 10.

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "ravingdesk-watershed": { "type": "http", "url": "https://ravingdeskwatershed.usefulweb.site/mcp" }
  }
}