span8
span4
span8
span4
Stream order numbers are a measurement of the branching of streams and tributaries.FME can calculate these as either aStrahleror Horton number.
The first source dataset for this example is a hydrological network in MapInfo MID/MIF format:
The second dataset is a raster digital elevation model in CDED (or USGS) format:
The two datasets have been reprojected to the same coordinate system and cleaned up so as to be ready for processing.
In this example we wish to calculate Strahler order numbers for the hydrological network.To do so we will also need to use the DEM to determine the direction of flow of the streams.
Completed Workspace as a Template (2016)
Completed Workspace as a Template (2018.1)
1.Start FME Workbench and begin with an empty canvas.
Select Readers > Add Reader from the menubar.
Set the data format to MapInfo MIF/MID.Select the attached mif file as the source dataset.
2.Again,select Readers > Add Reader from the menubar.
This time set the data format to Canadian Digital Elevation Data (CDED) or U.S.Geological Survey Digital Elevation Model (USGSDEM).Select the attached DEM dataset as the source.
3.Place a TopologyBuilder transformer connected to the StreamNetwork feature type.The TopologyBuilder will provide us with nodes with which to find the lowest point on each stream segment.The default parameter values are fine for this example.
4.Place a StreamOrderCalculator transformer.Connect the TopologyBuilder:Edge port to the StreamOrderCalculator:Line port.The workspace will now look like this:
5.Open the StreamOrderCalculator parameters dialog.Set the Fix Flow Direction of Input parameter to "Yes".Set the Stream Order Type parameter to "Strahler".
6.The Destination port on the StreamOrderCalculator requires the point feature (node) from the lower end of the network.To get this we'll use the raster DEM to find the node with the lowest elevation.
So,place a PointOnRasterValueExtractor transformer.Connect the DEM reader feature type to the Raster input port and the TopologyBuilder:Node output to the Point input port:
The default parameter values are fine for this example.
7.Now add a Sorter transformer.Connect it to the PointOnRasterValueExtractor:Point output port.This will be used to sort the nodes into order of elevation.Open the parameters dialog and sort on the attribute _band{0}.value in numeric ascending order:
You select _band{0}.value by first selecting _band{}.value and then entering the value 0 when prompted.
8.Now add a Sampler transformer connected to the Sorter:Sorted port.This will be used to select the first node,the one that has the lowest elevation.Open the parameters dialog and set Sampling Rate to 1 and Sampling Type to "First N Features".
Connect the Sampler:Sampled port to the StreamOrderCalculator:Destination input port:
9.Connect an Inspector transformer to the StreamOrderCalculator:Network output port and run the translation.Query the stream features.The Strahler numbers will be these:
Further updates to this project,should you wish to try them,would be to:
Point in Polygon Calculations with the PointOnAreaOverlayer
Shortest Route Calculations with the ShortestPathFinder
Calculate Strahler Stream Order Numbers
Determining Spatial Relationships
Coordinate Systems and Measurements with the Reprojector
Distance Measurements with the LengthCalculator
Buffering features for Spatial Relationship Analysis
© 2019 亚搏在线Safe Software Inc |Legal