Module pipelines.rj_escritorio.notify_flooding.utils

Utilities for the flooding notification pipeline.

Functions

def get_circle(latitude: float, longitude: float, radius: float, fname: str = None) ‑> geopandas.geodataframe.GeoDataFrame

Get a circle geometry from a point and a radius.

Args

latitude
Latitude of the point.
longitude
Longitude of the point.
radius
Radius of the circle in meters.
fname
File name to save the circle geometry in KML (if None, the geometry is not saved).

Returns

GeoDataFrame with the circle geometry.

def send_email(from_address: str, to_address: Union[str, List[str]], subject: str, body: str, smtp_server: str, smtp_port: int, smtp_username: str = None, smtp_password: str = None, tls: bool = True, attachment: str = None)

Sends an email, optionally with an attachment.