metobs_toolkit.site.Site#

class Site(stationname: str, latitude: float, longitude: float, extradata: dict | None = None)[source]#

Holds all metadata and location-based data of a site (station location).

Parameters:
  • stationname (str) – Name of the station.

  • latitude (float) – Latitude of the station.

  • longitude (float) – Longitude of the station.

  • extradata (dict, optional) – Additional metadata for the site, by default {}.

__init__(stationname: str, latitude: float, longitude: float, extradata: dict | None = None)[source]#

Initialize a Site with name, coordinates, and optional extra metadata.

Parameters:
  • stationname (str) – Name of the station this site belongs to.

  • latitude (float) – Latitude of the station in decimal degrees.

  • longitude (float) – Longitude of the station in decimal degrees.

  • extradata (dict, optional) – Additional metadata for the site (e.g. {'altitude': 10.5, 'LCZ': 'LCZ-4'}). Default is None (treated as empty dict).

Methods

__init__(stationname, latitude, longitude[, ...])

Initialize a Site with name, coordinates, and optional extra metadata.

add_metadata(metadata)

Add metadata to the site.

flag_has_LCZ()

Check if the site has LCZ information.

flag_has_altitude()

Check if the site has altitude information.

flag_has_coordinates()

Check if the site has valid coordinates.

flag_has_landcoverfractions()

Check if the site has land cover fractions.

get_gee_point_buffer_fractions(...[, ...])

Extract buffer fractions from a GEEStaticDatasetManager.

get_gee_point_metadata(gee_static_manager[, ...])

Extract static point metadata from a GEEStaticDatasetManager.

get_info([printout])

Retrieve and optionally print basic information about the site.

set_LCZ(LCZ)

Set the LCZ attribute.

set_altitude(altitude)

Set the altitude attribute.

set_gee_buffered_frac_data(buffer, data)

Set buffered fraction data for a given buffer radius.

set_geedata(dataname, value)

Set a value in the geedata dictionary.

set_latitude(latitude)

Set the latitude attribute.

set_longitude(longitude)

Set the longitude attribute.

setup()

Transfer commonly used attributes from extradata into dedicated properties.

Attributes

LCZ

Return the LCZ.

altitude

Return the altitude.

buffered_fractions

Return the buffered fractions dictionary.

extradata

Return the extra metadata dictionary.

lat

Return the latitude.

lon

Return the longitude.

metadf

Return a DataFrame with all metadata and geometry.

stationname

Return the station name.