windwhisper.utils
Functions
|
Create a square bounding box around a point. |
|
Project geographic coordinates to the European LAEA CRS. |
Load the Google API key from the project secret file. |
Module Contents
- windwhisper.utils.create_bounding_box(center_x, center_y, buffer_meters)
Create a square bounding box around a point.
- Parameters:
center_x (float) – X coordinate of the centre.
center_y (float) – Y coordinate of the centre.
buffer_meters (float) – Distance applied in all directions.
- Returns:
Bounding box
(min_x, min_y, max_x, max_y).- Return type:
tuple[float, float, float, float]
- windwhisper.utils.translate_4326_to_3035(lon, lat)
Project geographic coordinates to the European LAEA CRS.
- Parameters:
lon (float) – Longitude in degrees.
lat (float) – Latitude in degrees.
- Returns:
Projected
(x, y)coordinates in metres.- Return type:
tuple[float, float]
- windwhisper.utils.load_secret()
Load the Google API key from the project secret file.
- Returns:
API key string when available, otherwise
None.- Return type:
str | None