digger.make.entrainment
¶
make.entrainment is used to generate D-Claw input files at all locations within the extent of a provided geotif except for the locations covered by polygons provided in a shapefile.
Such D-Claw input files are useful for specifying the location of material that can be entrained.
Module Contents¶
Functions¶
Generate output of entrainable material for use in D-Claw. |
API¶
- digger.make.entrainment.entrainment(topo_path: str, shapefile_path: str, aux5_prefix: str = 'aux5', depth: float = 2.0, check_crs: bool = True, plot: bool = True, write_tt3: bool = False, write_tif: bool = False, fig_path: str = 'entrainment_source.png') None ¶
Generate output of entrainable material for use in D-Claw.
Given a raster input
topo_path
and a shapefile inputshapefile_path
generate output tif and or tt3 files with constantdepth
thickness of material everywhere except for the extent of the polygons present inshapefile_path
.The intended use case is to provide as
shapefile_path
the extent of the initial, potentially mobile, material material, such that everywhere that there is no potentially mobile material entrainable material is generated.Should a user want to make entrainable material that matches the extent of polygons in a shapefile, they should use
make_slabs
.- Inputs:
- topo_pathstr
Path to rasterio-readable file containing the topography input file. Output is written at the resolution of this file. Expected in projected coordinates (e.g., meters or feet, not degrees).
- shapefile_pathstr
Path to fiona-readable file with one or more geometries of the landslide source extent. Geometries must be Polygon or LineString type. Required.
- aux5_prefixstr
Prefix of the output file created. If a tif is written, the filename will be
aux5_prefix``+
.tif``. If a tt3 is written, the extension will be.tt3
.- depthfloat
Depth of material.
- check_crsbool
Check compatibility between the coordinate reference system (CRS) of
topo_path
,source_path
, andsource_path_mask
.- plotbool
Whether to make plots depicting some aspects of the output. Often useful for honing in on the specific values of
alpha1
,alpha2
, andc
used for an application.- fig_pathstr
The base filepath for figures generated. The file extension will be used by matplotlib to determine the type of file (png, pdf, etc).
- write_tt3bool
Whether to write out topotype 3 file of aux5. If written, the
aux5_prefix
for each output has.tt3
added to the end.- write_tifbool
Whether to write out tif file of aux5. If written, the
aux5_prefix
for each output has.tt3
added to the end.
- Outputs:
None