sta2stac.analysers.utils module#

class sta2stac.analysers.utils.Utils(logger_properties: dict = {})[source]#

Bases: object

This is a utility class that contains some useful methods. For example, it can be used to open a JSON file, validate the STA link, get the number of entities, get the list of entities, and sanitize the name.

Parameters:

logger_properties (dict) – A dictionary containing the logger properties.

get_list_of_entities_id(link: str, entity: str, filter: str = '', requests_properties: dict = {}) list[source]#

Get the list of Things in the SensorThings API.

get_number_of_entities(link: str, entity: str, filter: str = '', requests_properties: dict = {}) int[source]#

Get the number of Things in the SensorThings API.

logger_properties: dict#

A dictionary containing the logger properties. By default it sets to None.

open_json_file(file_path: str) dict[source]#

Open the JSON file.

Open the SensorThings API entity.

sanitize_name(string: str) str[source]#

Making the STAC ID with hyphens.

Validate the SensorThings API link.