Site#

The Site holds all spatial metadata related to a station. This includes:

  • geographic coordinates (latitude, longitude, altitude),

  • Local Climate Zone (LCZ) information,

  • Google Earth Engine (GEE) extracted data,

  • and additional metadata.

The Site is a component of the Station class and provides spatial context for meteorological observations.

Constructor#

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

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

Data attributes#

A summary of all the attributes that hold or return spatial and metadata information.

Site.stationname

Return the station name.

Site.lat

Return the latitude.

Site.lon

Return the longitude.

Site.altitude

Return the altitude.

Site.LCZ

Return the LCZ.

Site.buffered_fractions

Return the buffered fractions dictionary.

Site.extradata

Return the extra metadata dictionary.

Site.metadf

Return a DataFrame with all metadata and geometry.

Setters#

Methods for updating site metadata and spatial information.

Site.set_latitude(latitude)

Set the latitude attribute.

Site.set_longitude(longitude)

Set the longitude attribute.

Site.set_altitude(altitude)

Set the altitude attribute.

Site.set_LCZ(LCZ)

Set the LCZ attribute.

Site.set_geedata(dataname, value)

Set a value in the geedata dictionary.

Site.set_gee_buffered_frac_data(buffer, data)

Set buffered fraction data for a given buffer radius.

Site.add_metadata(metadata)

Add metadata to the site.

Status check methods#

Methods to check the availability of specific metadata.

Site.flag_has_altitude()

Check if the site has altitude information.

Site.flag_has_LCZ()

Check if the site has LCZ information.

General methods#

Site.get_info([printout])

Retrieve and optionally print basic information about the site.

Special methods#

The Site class implements several Python special methods for convenience:

  • __add__: Merge two Site objects, combining metadata and preferring non-NaN values from the first site.

  • __eq__: Test equality between two Site objects based on location and metadata.

  • __repr__: String representation showing site name and key spatial information.