eolearn.features.bands_extraction

A collection of bands extraction EOTasks

class eolearn.features.bands_extraction.EuclideanNormTask(*args, **kwargs)[source]

Bases: eolearn.core.core_tasks.MapFeatureTask

The task calculates the Euclidean Norm:

\(Norm = \sqrt{\sum_{i} B_i^2}\)

where \(B_i\) are the individual bands within a user-specified feature array.

Parameters
  • input_feature (an object supported by the FeatureParser) – A source feature from which to take the subset of bands.

  • output_feature (an object supported by the FeatureParser) – An output feature to which to write the euclidean norm.

  • bands (list) – A list of bands from which to extract the euclidean norm. If None, all bands are taken.

map_method(feature)[source]
Parameters

feature (numpy.array) – An eopatch on which to calculate the euclidean norm.

class eolearn.features.bands_extraction.NormalizedDifferenceIndexTask(*args, **kwargs)[source]

Bases: eolearn.core.core_tasks.MapFeatureTask

The task calculates a Normalized Difference Index (NDI) between two bands A and B as:

\(NDI = \dfrac{A-B+c}{A+B+c}\),

where c is provided as the acorvi_constant argument. For the reasoning behind using the acorvi_constant in the equation, check the article Using NDVI with atmospherically corrected data.

Parameters
  • input_feature (an object supported by the FeatureParser) – A source feature from which to take the bands.

  • output_feature (an object supported by the FeatureParser) – An output feature to which to write the NDI.

  • bands (list) – A list of bands from which to calculate the NDI.

  • acorvi_constant (float) – A constant to be used in the NDI calculation. It is set to 0 by default.

  • undefined_value – A value to override any calculation result that is not a finite value (e.g.: inf, nan).

map_method(feature)[source]
Parameters

feature (numpy.array) – An eopatch on which to calculate the NDI.