demcompare.classification_layer.slope_classification
Mainly contains the SlopeClassification class.
Module Contents
Classes
SlopeClassificationLayer |
- class demcompare.classification_layer.slope_classification.SlopeClassificationLayer(name: str, classification_layer_kind: str, cfg: Dict, dem: xarray.Dataset = None)[source]
Bases:
demcompare.classification_layer.classification_layer_template.ClassificationLayerTemplate
SlopeClassificationLayer
- fill_conf_and_schema(cfg: demcompare.internal_typing.ConfigType = None) demcompare.internal_typing.ConfigType [source]
Add default values to the dictionary if there are missing elements and define the configuration schema
- Parameters:
cfg (ConfigType) – coregistration configuration
- Return cfg:
coregistration configuration updated
- Return type:
ConfigType
- static check_ranges(cfg: dict) None [source]
Verify users configuration for ranges in slope classification :param cfg: slope configuration :type cfg: dict :return: None
- _create_slope_map_datasets(dem: xarray.Dataset)[source]
Create slope map datasets
- Parameters:
dem – input dem
- Returns:
None
- static _generate_classes(ranges) collections.OrderedDict [source]
Create classes from ranges
- Parameters:
ranges (List) – ranges
- Returns:
classes
- Return type:
collections.OrderedDict
- _classify_slope_by_ranges(slope_dataset: xarray.Dataset, support: str = 'ref')[source]
Create the map for each slope using the input ranges (value interval is transformed into 1 value (interval minimum value))
- Parameters:
slope_dataset – slope dataset
support (str) – support dem, ref or sec
- Returns:
None