demcompare.classification_layer.slope_classification ==================================================== .. py:module:: demcompare.classification_layer.slope_classification .. autoapi-nested-parse:: Mainly contains the SlopeClassification class. Classes ------- .. autoapisummary:: demcompare.classification_layer.slope_classification.SlopeClassificationLayer Module Contents --------------- .. py:class:: SlopeClassificationLayer(name: str, classification_layer_kind: str, cfg: Dict, dem: xarray.Dataset = None) Bases: :py:obj:`demcompare.classification_layer.classification_layer_template.ClassificationLayerTemplate` SlopeClassificationLayer .. py:attribute:: _RANGES :value: [0, 5, 10, 25, 45] .. py:attribute:: ranges :type: List .. py:method:: fill_conf_and_schema(cfg: demcompare.internal_typing.ConfigType = None) -> demcompare.internal_typing.ConfigType Add default values to the dictionary if there are missing elements and define the configuration schema :param cfg: coregistration configuration :type cfg: ConfigType :return cfg: coregistration configuration updated :rtype: ConfigType .. py:method:: check_ranges(cfg: dict) -> None :staticmethod: Verify users configuration for ranges in slope classification :param cfg: slope configuration :type cfg: dict :return: None .. py:method:: _create_labelled_map() Create the labelled map and save it if necessary :return: None .. py:method:: _create_slope_map_datasets(dem: xarray.Dataset) Create slope map datasets :param dem: input dem :type dem: xr.DataSet containing : - image : 2D (row, col) xr.DataArray float32 - georef_transform: 1D (trans_len) xr.DataArray - classification_layer_masks : 3D (row, col, indicator) xr.DataArray :return: None .. py:method:: _generate_classes(ranges) -> collections.OrderedDict :staticmethod: Create classes from ranges :param ranges: ranges :type ranges: List :return: classes :rtype: collections.OrderedDict .. py:method:: _classify_slope_by_ranges(slope_dataset: xarray.Dataset, support: str = 'ref') Create the map for each slope using the input ranges (value interval is transformed into 1 value (interval minimum value)) :param slope_dataset: slope dataset :type slope_dataset: xr.DataSet containing : - image : 2D (row, col) xr.DataArray float32 - georef_transform: 1D (trans_len) xr.DataArray - classification_layer_masks : 3D (row, col, indicator) xr.DataArray :param support: support dem, ref or sec :type support: str :return: None