remotior_sensus.core.spectral_signatures module

class remotior_sensus.core.spectral_signatures.SpectralSignaturePlot(value, wavelength, standard_deviation=None, pixel_count=None, signature_id=None, macroclass_id=None, class_id=None, macroclass_name=None, class_name=None, color_string=None, selected=None)

Bases: object

A class to manage Spectral Signatures for plots.

__init__(value, wavelength, standard_deviation=None, pixel_count=None, signature_id=None, macroclass_id=None, class_id=None, macroclass_name=None, class_name=None, color_string=None, selected=None)
class remotior_sensus.core.spectral_signatures.SpectralSignaturePlotCatalog(signature: SpectralSignaturePlot | None = None)

Bases: object

A class to manage Spectral Signatures Catalog for plots.

__init__(signature: SpectralSignaturePlot | None = None)
add_signature(signature: SpectralSignaturePlot)
get_generic_attributes(selected=True) list

Gets generic attributes in the catalog.

This function gets generic attributes from the catalog.

Returns:

The list of values.

get_signature(signature_id) SpectralSignaturePlot

Gets signature in the catalog.

This function gets signature by id from the catalog.

Returns:

The SpectralSignaturePlot.

Examples

Get signature.
>>> catalog = SpectralSignaturePlotCatalog()
>>> signature = catalog.get_signature(signature_id='signature_id')
>>> print(signature.signature_id)
'signature_id'
get_signature_color(selected=True) list

Gets signature color in the catalog.

This function gets signature color from the catalog.

Returns:

The list of values.

get_signature_count() int

Gets count of signatures in the catalog.

This function gets the count of signatures present in the catalog.

Returns:

The integer number of signatures.

Examples

Count of signatures present.
>>> catalog = SpectralSignaturePlotCatalog()
>>> count = catalog.get_signature_count()
>>> print(count)
1
get_signature_ids() list

Gets signature ids in the catalog.

This function gets signature ids from the catalog.

Returns:

The list of ids.

Examples

Get signature.
>>> catalog = SpectralSignaturePlotCatalog()
>>> signature_ids = catalog.get_signature_ids()
>>> print(signature_ids)
['signature_id']
get_signature_names(selected=True) list

Gets signature names in the catalog.

This function gets signature names from the catalog, derived from SpectralSignaturePlot.

Returns:

The list of values.

Examples

Get signature.
>>> catalog = SpectralSignaturePlotCatalog()
>>> signature_names = catalog.get_signature_names()
>>> print(signature_names)
['name']
get_signature_standard_deviation(selected=True) list

Gets signature standard deviation in the catalog.

This function gets signature standard deviation from the catalog.

Returns:

The list of values.

get_signature_values(selected=True) list

Gets signature values in the catalog.

This function gets signature values from the catalog.

Returns:

The list of values.

get_signature_wavelength(selected=True) list

Gets signature wavelength in the catalog.

This function gets signature wavelength from the catalog.

Returns:

The list of values.

remove_signature(signature_id: str)
class remotior_sensus.core.spectral_signatures.SpectralSignaturesCatalog(bandset: BandSet | None = None, catalog_table=None, geometry_file_path=None, macroclass_field=None, class_field=None)

Bases: object

A class to manage Spectral Signatures and ROIs.

__init__(bandset: BandSet | None = None, catalog_table=None, geometry_file_path=None, macroclass_field=None, class_field=None)
add_signatures_to_plot_by_id(signature_id_list, return_plot=False)
add_spectral_signature(value_list, macroclass_id=None, class_id=None, macroclass_name=None, class_name=None, wavelength_list=None, standard_deviation_list=None, signature_id=None, selected=1, min_dist_thr=0, max_like_thr=0, spec_angle_thr=0, geometry=0, signature=0, color_string=None, pixel_count=0, unit=None)

Adds a spectral signature.

This method adds spectral signature to Spectral Signatures Catalog.

Parameters:
  • value_list

  • macroclass_id

  • class_id

  • macroclass_name

  • class_name

  • wavelength_list

  • standard_deviation_list

  • signature_id

  • selected

  • min_dist_thr

  • max_like_thr

  • spec_angle_thr

  • geometry

  • signature

  • color_string

  • pixel_count – pixel count

  • unit – unit

Returns:

object OutputManager()

calculate_bray_curtis_similarity(signature_id_x, signature_id_y)
calculate_euclidean_distance(signature_id_x, signature_id_y)
calculate_scatter_plot(roi_path, band_x, band_y, n_processes: int | None = None)
calculate_scatter_plot_by_id(signature_id: str, band_x, band_y, decimal_round: int | None = None, plot=False, n_processes: int | None = None)
calculate_signature(roi_path, n_processes: int | None = None)
calculate_spectral_angle(signature_id_x, signature_id_y)
export_signature_values_for_plot(signature_id, plot_catalog=None)
export_signatures_as_csv(signature_id_list, output_directory, separator=',')
export_vector(signature_id_list, output_path, vector_format=None)
import_file(file_path)
import_spectral_signature_csv(csv_path, macroclass_id=None, class_id=None, macroclass_name=None, class_name=None, separator=',', color_string=None)
import_vector(file_path, macroclass_value=None, class_value=None, macroclass_name=None, class_name=None, macroclass_field=None, class_field=None, macroclass_name_field=None, class_name_field=None, calculate_signature=True, color_string=None)
load(file_path)
merge_signatures_by_id(signature_id_list, calculate_signature=True, macroclass_id=None, class_id=None, macroclass_name=None, class_name=None, color_string=None)
remove_signature_by_id(signature_id: str)
save(output_path, signature_id_list=None)
set_crs_from_bandset(bandset)
set_macroclass_color(macroclass_id, color_string)
signature_to_catalog(signature_id, macroclass_id, class_id, macroclass_name=None, class_name=None, selected=1, min_dist_thr=0, max_like_thr=0, spec_angle_thr=0, geometry=0, signature=0, color_string=None, pixel_count=0, unit=None)
remotior_sensus.core.spectral_signatures.generate_signature_id()