Move Outlets To Streams

Title  Move Outlets To Streams

Summary

Moves outlet points that are not aligned with a stream cell from a stream raster grid, downslope along the D8 flow direction until a stream raster cell is encountered, the max_dist number of grid cells are examined, or the flow path exits the domain (i.e. a "no data" value is encountered for the D8 flow direction). The output file is a new point OGR file where each point has been moved to coincide with the stream raster grid, if possible. A field 'dist_moved' is added to the new outlets file to indicate the changes made to each point. Points that are already on a stream cell are not moved and their 'dist_moved' field is assigned a value 0. Points that are initially not on a stream cell are moved by sliding them downslope along the D8 flow direction until one of the following occurs: a.) A stream raster grid cell is encountered before traversing the max_dist number of grid cells. In which case, the point is moved and the 'dist_moved' field is assigned a value indicating how many grid cells the point was moved. b.) More than the max_number of grid cells are traversed, or c) the traversal ends up going out of the domain (i.e., a "no data" D8 flow direction value is encountered). In which case, the point is not moved and the 'dist_moved' field is assigned a value of -1.


Usage

Command Prompt Syntax:

mpiexec -n <number of processes> MoveOutletsToStreams -p <pfile> -src <srcfile> -o <outletfile> [ -lyrname <layer name>] [ -lyrno <layer number>] -om <movedoutletsfile> [ -omlyr omlayername] [ -md maxdist]

Note that if the -md flag and max_dist parameter is not given, the default of 50 is used.

pfile: File name for D8 flow direction grid (input)

srcfile: File name for stream raster grid (input)

maxdist : maximum number of grid cells to traverse in moving outlet points (input)

outletfile: input outlets file (OGR readable dataset)

layer name: OGR layer name if outlets are not the first layer in outletfile (optional)

layer number: OGR layer number if outlets are not the first layer in outletfile (optional)

Layer name and layer number should not both be specified.

movedoutletsfile: Output OGR file where outlets have been moved

omlayername: layer name in movedoutletsfile (Optional)


Syntax

MoveOutletsToStreams (Input_D8_Flow_Direction_Grid, Input_Stream_Raster_Grid, Input_Outlets, Input_Maximum_Distance, Input_Number_of_Processes, Output_Outlets_file)

Parameter Explanation Data Type
Input_D8_Flow_Direction_Grid Dialog Reference

This input is a grid of flow directions that are encoded using the D8 method where all flow from a cells goes to a single neighboring cell in the direction of steepest descent.

Raster Layer
Input_Stream_Raster_Grid Dialog Reference

This output is an indicator grid (1,0) that indicates the location of streams, with a value of 1 for each of the stream cells and 0 for the remainder of the cells. This file is produced by several different tools in the "Stream Network Analysis" toolset.

Raster Layer
Input_Outlets Dialog Reference

A point feature defining points of interest or outlets that should ideally be located on a stream, but may not be exactly on the stream due to the fact that the feature point locations may not have been accurately registered with respect to the stream raster grid.

Feature Layer
Input_Maximum_Distance Dialog Reference

This input paramater is the maximum number of grid cells that the points in the input outlet feature will be moved before they are saved to the output outlet feature.

Double
Input_Number_of_Processes Dialog Reference

This input indicates the number of stripes that the domain will be divided into and the number of MPI parallel processes that will be spawned to evaluate each piece of the domain.

Long
Output_Outlets_file Dialog Reference

A point OGR file defining points of interest or outlets. This output has one point in it for each point in the input outlet feature. If the original point was located on a stream, then the point was not moved. If the origianl point was not on a stream, the point was moved downslope according to the D8 flow direction until it reached a stream or the maximum distance had been reached. This file has an additional field "dist_moved" added to it which is the number of cells that the point was moved. This field is 0 if the cell was originally on a stream, -1 if it was not moved becuase there was not a stream within the maximum distance, or some positive value if it was moved.

File

Code Samples

Tags

Credits

Use limitations