easy_vic_build.tools.hydroanalysis_func.create_flow_distance

Create flow-distance rasters from D8 flow-direction grids.

Functions

create_flow_distance(flow_distance_path, ...)

Calculate flow distance per grid cell and write it as a GeoTIFF file.

easy_vic_build.tools.hydroanalysis_func.create_flow_distance.create_flow_distance(flow_distance_path, flow_direction_array, x_length_array, y_length_array, transform, crs_str='EPSG:4326')[source]

Calculate flow distance per grid cell and write it as a GeoTIFF file.

Parameters:
  • flow_distance_path (str) – Output file path for flow-distance raster.

  • flow_direction_array (numpy.ndarray) – D8 flow-direction code array.

  • x_length_array (numpy.ndarray) – Grid-cell length in the x direction.

  • y_length_array (numpy.ndarray) – Grid-cell length in the y direction.

  • transform (affine.Affine) – Affine transform used when writing the output raster.

  • crs_str (str, optional) – CRS string for the output raster.

Returns:

The function writes output to flow_distance_path.

Return type:

None