Class ModelCatchment

class core.ModelCatchment.ModelCatchment[source]

TODO

build_globalDEM(param, user_list=None)[source]

Compute the hydrological map using pyshed library. The final map isa merged of all DEM

Parameters:
  • parameter (Parameter) – parameter for ciomputation

  • user_list (string:) – list of file for all DEM to consider

clipRiverFromDEM()[source]

Clip the hydrographic network as a function of boundary limit obtained from DEM file. Multilines are converted in linestring and added as a new reach

createReach()[source]

Create the reach variable from data in the hydrographic network

create_network(param)[source]

Create the hydrographic network from hydrological map (directino , flow acc) using pysheds

Parameters:

parameter (Parameter) – parameter for ciomputation

findCatchment(param)[source]

select the DEM corresponding to the polygon provided by users :param parameter: parameter for ciomputation :type parameter: Parameter

find_junctionAndOutlet(dist_min)[source]

Find the location of junctions between 2 reaches find outlet on the DEM boundary corresponding to various catchments.

Parameters:

dist_min (float) – minimum distance between 2 reaches to consider a junction

interpolateReach(step)[source]
Change the distance between point of the center line of the reach. These points are those where sections

will be plotted

Parameters:

step (int) – distance in meter between two floowing point on centerline of reach

order_network(min_dist_junction)[source]

sort river reach from upstream to downstream considering averaged slope. Consecutive reaches without confluence are gathered (a reach can belong to only one river)

Parameters:

min_dist_junction (float) – Minimal distance between junctions

projectionOnDEM(type_projection, interpolation_method)[source]

Project the river reach (in the hydrographic network) on the DEM. The projection is made sequentially for each DEM file.

The variable type_projection gives the method for projection:

interpolation : use of interpolation 2D from scipy for each point on the DEM file raster : transform line in binary map (fast but only one measurement by DEM cell size)

Metadata from BD carthage are saved and adapted

Parameters:
  • type_projection (string) – interpolation or raster

  • interpolation_method (string:) – method for 2D interpolation (nearest, cubic, linear)

read_DEM_stack(DEM_path_ext=None, qgis_DEM_layer=None, DEM_file_list=None)[source]

Read all the DEM in the folder given by DEMpath. The user has to select the region of interest selecting the DEM file corresponding

Parameters:
  • DEM_path_ext (tuple(str, str), optional) – DEM path and file extension

  • qgis_DEM_layer (QGIS DEM layer, optional) – QGIS DEM layer

  • DEM_file_list (list(str), optional) – DEM file list

read_network(qgis_river_layer=None, river_filename=None, nclassemax=1, BDOEfilename=None)[source]

Read the hydrographic network in the .shp format from BD carthage

Filename:

file path of the BD carthage file

:rtype : pandas geodataframe : hydrographic network :rtype: int : number of river reach

renameReachFromJunction(params)[source]

Rename reach considering junction.

River is partitioned to get reach with a consistent discharge for each reach. For each river , reaches have a increasing id from the downstream to upstream. Id river is also corrected from 0 to Nriver. The name of reach refers to river and number of reach from downstream.

Parameters:

compute_global (boolean) – whether to compute global reach considering junction.

setOutlet(arg, outlet=<POINT EMPTY>)[source]

set the outlet of the considered netwok in the list of all outlets detected

Parameters:

arg (TODO) – TODO