Munin.Geo package

Subpackages

Submodules

Munin.Geo.Geo module

class Munin.Geo.Geo.RetrieveGeoCode[source]

Bases: object

static getClimateCode(lon, lat, epsg=4326) SwedenClimateZone | None[source]

Retrieve the climate zone enum member for a given coordinate.

Parameters:
  • lon (float) – Longitude (in the input CRS).

  • lat (float) – Latitude (in the input CRS).

  • epsg (int) – EPSG code for the input coordinates (default: 4326).

Returns:

The climate zone enum member or None if not found.

Return type:

Sweden.ClimateZone | None

static getCountyCode(lon, lat, epsg=4326) SwedenCounty | None[source]

Retrieve the county enum member for a given coordinate.

Parameters:
  • lon (float) – Longitude (in the input CRS).

  • lat (float) – Latitude (in the input CRS).

  • epsg (int) – EPSG code for the input coordinates (default: 4326).

Returns:

The corresponding SwedenCounty enum member or None if not found.

Return type:

SwedenCounty | None

static getDistanceToCoast(lon, lat, epsg=4326)[source]

Calculate the distance from a given point (lon, lat in the input CRS) to the nearest coastline point. Internally, the calculation is done in the metric projection EPSG:3857.

Parameters:
  • lon (float) – Longitude (in the input CRS).

  • lat (float) – Latitude (in the input CRS).

  • epsg (int) – EPSG code for the input coordinates (default: 4326).

Returns:

Distance in kilometers to the nearest coastline.

Return type:

float

Module contents