In hydrology, a watershed is a region of terrain which shares a common drainage. Also called a drainage basin, a watershed is any area of land where precipitation, like rainfall, collects and drains off into a common outlet. For example, all the water falling as rain into a mountain valley may collect in the valley and then drain off from the lowest point of the valley into the next, lower watershed, where it may be joined by rainfall from other mountain valleys. A watershed that has no outlet, for example, Crater Lake in Oregon, the Dead Sea in the Middle East, or the Caspian Sea between Europe and Asia, is called a sink. A sink is a closed drainage basin, or, more technically, an endorheic drainage basin.
Given an image with a channel that represents terrain elevations, the Watershed template computes watersheds in terrain elevation data in the specified Channel and outputs the watershed analysis in various forms. This topic should be read together with other watershed topics:
Example: Create Watershed Areas - Create areas that show regions of common drainage.
Example: Create Watershed Lines - Create lines that show networks of streams into which water flows within a region of common drainage.
Shreve Order and Strahler Order - Systems to assign a number to each watershed area or stream line which indicates at what level it lies within the branching hierarchy of the overall drainage system.
Watershed Areas, Sinks - Create areas for regions that are sinks, that is, closed drainage basins or pits.
Watershed Prepare: Filling Sinks - Fill sinks in preparation for subsequent watershed analysis.
Upstream Areas and Lines - Given a terrain image and a drawing of points, find the drainage basins and the stream lines from which water flows into each point.
Downstream Lines - Given a terrain image and a drawing of points, find the stream line for each point by which water issuing from the point flows further downstream.
Flow Direction and Accumulation - A topic showing an easy use of SQL to compute flow direction and accumulation.
Watersheds depend on the data used - The results obtained from various watershed templates will depend on the data used.
With the focus on a window that contains a raster image as a layer, the Watershed template appears in the Transform pane when a Tile field is picked that in at least one channel that represents the height of terrain at each pixel. The Watershed template creates a new drawing containing areas or lines, representing watershed areas or stream lines, with attributes for each object providing useful information, such as the total flow through that object. The new drawing inherits the coordinate system of the terrain elevation image.
The Watershed template provides six operations, three of which work only with the source raster image and three of which work with the raster image plus a drawing. The areas, lines, and sink areas output operations use only a raster image. The downstream lines, upstream areas, and upstream lines output operations, require both an image for terrain elevations and also a drawing for points. Both the image and the drawing must be in the same map.
Open an image that represents terrain elevation.
In the Transform pane, choose the image and the Tile field in that image.
Double-click the Watershed template to launch it.
In the Watershed template options, choose the Channel desired. Single channel images will automatically have channel 0 loaded.
Choose the areas or lines operation for the Output.
Specify the Minimum flow required to create a watershed area or stream line. Smaller Minimum flow values will result in many more, smaller areas or streams. Larger Minimum flow values will result in fewer, larger areas or streams.
The Result is always a new drawing and table. Specify the names desired.
Press Transform.
.
With the focus on the target window, in the Transform pane choose the terrain elevation image to be used, and choose the Tile field. Double-click on the Watershed template to launch it in the Transform pane
Up one level. Return to the main template list to allow choosing the component or field. Use this button to choose a different template. |
|
<component name> |
Gives the name of the raster image layer in the map that the template is using as a source of terrain elevation data. If the map has other raster image layers, we can change to any other raster image layer in the same map. |
Field |
The name of the tile field on which the template operates. If the raster image has other tile fields providing terrain elevation data, we can choose any other such tile field. |
Channel |
The channel to use for terrain elevation data if the tile field in use has more than one channel. Raster images typically provide terrain elevation data using tiles that have only one channel, channel 0, where each value is a single number that gives the height of the pixel. |
Water channel |
The Water channel parameter allows choosing a channel in the image that provides relative water amounts dropping onto each pixel. If no water channel is selected, all pixels are assumed to have the same precipitation amounts dropping onto each pixel.
Water channels are used for analyses such as modeling downhill flow of fluids seeping from the surface. Suppose we have a terrain where some parts of the terrain are seeping oils, and we have a channel that for each pixel shows the amount of oil seeping from that pixel. Using that channel as a water channel would provide a means of finding watershed lines that represent downhill flow of seeping oil.
|
Output |
Choose the output option to use within this template. The Transform pane will automatically configure controls to match the output option selected.
Available Output operations:
|
Minimum flow |
The minimum total flow in the basin required to create a watershed area or stream line. Smaller Minimum flow values will result in many more, smaller areas or streams. Larger Minimum flow values will result in fewer, larger areas or streams. |
Result |
Specify the destination for the result of the transform.
When the template creates a drawing, there is only one choice, New Table, since a new drawing must be created. When the template creates an image, there are four choices for saving the raster image created by the template:
|
Result type |
Appears when saving a drawing result to a new table. The geometry type to use, Manifold's native geom type, geommfd type, or geomWKB type. Use the native geom type. |
Channel type |
Appears when saving an image result to a new field or to a new table. The numeric type of channel to use when creating a new field or a new table. |
New drawing |
Appears when saving a drawing result to a new field or to a new table. The name to use for the new drawing the template will create. |
New image |
Appears when saving an image result to a new field or to a new table. The name to use for the new image the template will create. |
New table |
Appears when saving the result to a new table. The name to use for the new drawing's or new image's table the template will create. |
Resources |
A choice of CPU and GPU parallelization resources the system is allowed to use:
CPU "cores" are used in the Windows meaning of the word core, meaning hyperthread for CPUs that support hyperthreading when hyperthreading is turned on in the BIOS. Since most modern CPUs and systems support hyperthreading, when Windows reports the number of cores it is really reporting the number of threads. GPU cores are either used fully parallel for all cores or GPU is not used at all.
The Resources setting puts limits on what the system is allowed to use. It does not force parallelization if that would result in slower operation.
|
Transform |
Apply the transform template. |
Preview |
Show a preview in blue preview color of what the transform operation will do, when possible. A preview is just a temporary view and does not change anything.
Press the Preview button to launch a preview, or to update a preview after changing any parameters or controls in the pane. A preview will stay in view until we hide it, or until a layer used to compute the preview is removed or refreshed. We can add layers, pan and zoom, alt-click objects to view attributes, and edit layers without losing the preview.
Closing a preview: In map windows, right-click the blue preview caption bar at the top of the window and choose Hide Preview. In table windows, right-click the blue preview column head and choose Hide Preview. |
Edit Query |
Launch a Command Window loaded with the SQL query that performs this transform with given settings. |
The Watershed template creates the following fields in the Results drawings it creates:
mfd_id |
Manifold identify field. |
Geom |
The geometry of the area or stream watershed object. |
Stream |
A unique, numeric, watershed identifier for the watershed area or stream line object. |
Target |
The watershed identifier for the watershed area or stream line object into which water from this object flows. |
OrderShreve |
Watershed order computed using Shreve ordering. |
OrderStrahler |
Watershed order computed using Strahler ordering. |
Value |
The flow contributed by this watershed object. |
ValueSum |
The total flow through this watershed object, including all flow from upstream watershed objects as well as flow from this object. |
We can see the fields that are created by opening a typical schema for a table of watershed areas:
In addition to the usual mfd_id_x index created on the mfd_id key field, and the usual Geom_x spatial index created on the Geom geometry field, the Watershed : areas and Watershed : lines transform operations will automatically create a Stream_x btree index on the Stream ID field and a Target_x btreedup (allows duplicates) index on the Target ID field. Indexes on those fields are provided to speed up any subsequent analysis using those fields.
We illustrate the basic concepts in watershed areas and watershed lines using an image that shows terrain elevation. The sample image was imported from a 1/9th arc-second digital elevation raster in ERDAS .img format, part of the USGS National Map 3DEP data set and downloaded from the USGS EarthExplorer web site. It shows terrain elevations on the San Francisco peninsula in California, near Montara Mountain.
In the illustration above, we have zoomed into the region surrounding Pilarcitos Lake, the flatter region at the center lower right of the illustration. The image has been Styled using the Color Brewer Spectral palette that shows higher regions in red and lower regions in blue. Hill shading has been applied.
We zoom into the terrain to provide a simpler illustration. Above, we seen the hill shaded terrain. We can see there are hills and valleys, and we can see that in some parts of the view water will flow in different directions into common drainage areas. We can imagine magenta arrows showing the direction of flow from the ridge line of a local hill. But where are the precise borders between different drainage regions? Where is the ridge line that divides one drainage region from another?
The Watershed : areas operation answers those questions, by creating a drawing with areas where each area is a different drainage. We have turned on a drawing layer created by Watershed : areas in the illustration above, and have Styled the areas with transparent fill color, so only the borders of the areas are visible. We can now see exactly where the ridge line is located on the hill.
The Watershed : lines operation shows drainages by showing the locations of stream lines, the lines where streams would form as water drains downhill within each drainage region. Stream lines created by Watershed : lines are shown in the illustration above as blue lines. Only those lines that have a minimum flow of 500 have been created, so watershed areas where the flow in streams running downhill is less than 500 do not have streams in them.
In both of the above cases, the computations for areas and for lines were done using a Minimum flow value of 500. Setting the flow value allows us to control the granularity, that is, the size of the watershed area or stream line of interest. Each of the stream lines above has a flow of at least 500 units. If we had set the flow size smaller and smaller, then the operation would have begun building smaller and smaller tributaries to each of the above illustrated streams, eventually showing a network of fine streams, almost like capillaries, running down each small valley feeding the main streams.
If we do not specify a Water channel giving a different amount of water for each pixel, total flow is computed by assuming that 1 unit of water falls on every pixel that makes up the terrain. As water flows downhill from each pixel, the water flowing from a number of different pixels will come together. If the water from ten pixels comes together, the combined flow will be 10 from all ten pixels that contribute to that stream.
Flow is dimensionless (no units, since units do not matter) because it does not matter whether it is 1 liter or 1 gallon or 1 swimming pool of water that falls on each pixel: if the water from ten pixels comes together flowing downhill the result will be a flow of 10 units from those ten pixels, whatever those units may be.
Consider the illustration above, which shows a very small portion of the Montara sample image that has been zoomed in, showing individual pixels as large blocks. The region shown is the bottom of a valley that slopes down to the center and then slopes to the upper right corner of the window.
Consider the case where 1 unit of water falls on each pixel marked with a 1 and then flows to the next pixel in the direction indicated by the blue arrows. As flow is summed up from pixel to pixel the total flow on each blue arrow is indicated by black numbers highlighted with white. For example, the flow from the lower left corner starts with values of 1 from each of four pixels in the lower left corner to form a flow of 4. As the flow continues into the next pixel, which contributes 1 unit from that pixel, the flow is joined by a flow from the left with a value of 2 and by a flow from the right with a value of 3, to form a flow of 10.
As flows accumulate in this way the end result in the upper right corner is a total flow value of 26.
Specifying the Minimum flow value in the Watershed : areas and Watershed : lines operations tells Manifold what the minimum flow must be for that flow to be considered a stream or the result of a drainage area.
For example, suppose we specify Minimum flow to be 20. That means any flow line that has a total flow of 20 or above would qualify as a watershed stream. In the Illustration above, there is only one flow direction that has a total flow of 20 or more, as indicated in red color above. If we specified a Minimum flow of 20, the Watershed : lines operation would build only a single stream line, as shown in red color.
Suppose we specify Minimum flow to be 10. That means any flow line that has a total flow of 10 or above would qualify as a watershed stream. In the Illustration above, there are two flow arrows that have a total flow of 10 or more. If we specified a Minimum flow of 10, the Watershed : lines operation would build two stream lines, end to end, as shown in red color above.
Specifying a Minimum flow of 4 qualifies several segments, and results in a larger collection of lines, with tributaries, as shown above in red color.
Sink is slang - The word sink is used casually and imprecisely in the name of the sink areas operation. The operation creates areas that are closed drainage basins, where all rainfall that falls anywhere within the area drains to a common point somewhere within the interior of the area. Strictly speaking, that common point is the sink. As a practical matter, sinks are usually not single points but are themselves areas, such as lakes, within the closed drainage basin into which all water drains. However, sink is such a short, convenient word that it has become popular as a synonym for closed drainage basin. ESRI calls sinks basins, and other packages may call sinks pits.
Manifold vs Arc - Fifty times Faster than Spatial Analyst - The first video in a series of comparisons. We compare Manifold Release 9 to ESRI's ArcMap with Spatial Analyst. ArcMap instead of ArcGIS Pro is used to ensure maximum possible speed with no slowdowns from AGOL connections. Starting with a terrain 5300 x 5300 elevation raster we compare Manifold workflow and speed creating streams (watershed lines) with ESRI ArcMap and Spatial Analyst doing the same task. ArcMap requires four operations calculating intermediate steps, taking a total of three minutes and 30 seconds to compute streams. Manifold does the same job in a single operation in under four seconds, over fifty times faster than Arc, and with the convenience of a single click. ArcMap plus Spatial Analyst cost over $5000 per seat while Manifold costs under $500. As data sizes scale up, Manifold gets even faster than Arc. Works in the free Viewer, too!
Manifold vs Arc - Watersheds Sixty Five times Faster than Arc - Another video comparing Manifold speed to ESRI ArcMap with Spatial Analyst, this time computing upstream watersheds on a 5300 x 5300 terrain elevation raster for a few dozen locations. ArcMap requires three geoprocessing tool operations calculating intermediate steps, taking a minute and a half. Manifold does the same job in a single click in less than 1.4 seconds, over 65 times faster than ESRI. The larger and more complex the geoprocessing, the greater Manifold's speed advantage. ArcMap plus Spatial Analyst cost over $5000 per seat while Manifold costs under $500. Works in the free Viewer, too!
Manifold vs Arc - Seven Seconds vs Four Minutes - Finding basins in a 5300 x 5300 terrain elevation raster, we compare Manifold workflow speed and ease of workflow to ESRI's ArcMap with Spatial Analyst. ArcMap Standard plus Spatial Analyst costs a total of $5250 so it should work better than a Manifold package that sells for under $500, right? No way! Manifold absolutely crushes the comparison, taking only a single click and seven seconds to do what takes the $5000+ package three geoprocessing operations and four minutes, not counting the time to setup and launch three operations. Works in the free Viewer, too!
Manifold vs Arc - 100x Faster on an Affordable Desktop - Watch Manifold do in 0.9 seconds what takes ArcMap plus Spatial Analyst over a minute and a half. That's over 100 times faster! Some comments on previous comparisons have stated that Manifold was so super fast compared to ESRI because tests were run on a high-end, Threadripper machine that could run 48 threads. This video shows Manifold is faster even with fewer cores on an affordable desktop system. We re-run Manifold trials on a Ryzen 9 3900x computer, with three different tasks taking only 0.9 seconds, 5.4 seconds and 3 seconds. AMD's 3900x CPU now retails for as low as $450, setting a new baseline for affordable GIS desktop computing. Everything shown in the video works in the free Viewer, too!
Example: Create Watershed Areas
Example: Create Watershed Lines
Shreve Order and Strahler Order
Watershed Prepare: Filling Sinks
Flow Direction and Accumulation