flexmeasures.utils.geo_utils

Functions

flexmeasures.utils.geo_utils.cos_rad_lat(latitude: float) float
flexmeasures.utils.geo_utils.earth_distance(location: tuple[float, float], other_location: tuple[float, float]) float

Great circle distance in km between two locations on Earth.

flexmeasures.utils.geo_utils.parse_lat_lng(kwargs) tuple[float, float] | tuple[None, None]

Parses latitude and longitude values stated in kwargs.

Can be called with an object that has latitude and longitude properties, for example:

lat, lng = parse_lat_lng(object=asset)

Can also be called with latitude and longitude parameters, for example:

lat, lng = parse_lat_lng(latitude=32, longitude=54) lat, lng = parse_lat_lng(lat=32, lng=54)

flexmeasures.utils.geo_utils.rad_lng(longitude: float) float
flexmeasures.utils.geo_utils.sin_rad_lat(latitude: float) float