pandemia.world.location¶
Module Contents¶
Classes¶
Represents a location, for example an area of land or a building. |
Functions¶
|
Convert from ETRS89 grid format to WGS84 lat, lon format. |
|
Convert from WGS84 lat, lon format to ETRS89 grid format. |
Attributes¶
- pandemia.world.location.LocationTuple¶
- class pandemia.world.location.Location(typ: str, coord: LocationTuple)¶
Represents a location, for example an area of land or a building.
Parameters:¶
- typstr
The type of location, as a string. For example “House” or “Restaurant”.
- coordtuple
A 2-tuple of floats, representing x, y coordinates.
- uuid¶
A universally unique identifier for this location (str).
- typ¶
The type of location, as a string (str). For example “House” or “Restaurant”.
- coord¶
A 2-tuple of floats, representing x, y coordinates (tuple).
- pandemia.world.location.ETRS89_to_WGS84(coord: LocationTuple) LocationTuple¶
Convert from ETRS89 grid format to WGS84 lat, lon format.
- Parameters:
coord (LocationTuple) – A 2-tuple of floats.
- Returns:
new_coord – If coord represents the coordinates of a location in ETRS89 format, then new_coord represents the coordinates of that location in WGS84 format.
- Return type:
LocationTuple
- pandemia.world.location.WGS84_to_ETRS89(coord: LocationTuple) LocationTuple¶
Convert from WGS84 lat, lon format to ETRS89 grid format.
- Parameters:
coord (LocationTuple) – A 2-tuple of floats.
- Returns:
new_coord – If coord represents the coordinates of a location in WGS84 format, then new_coord represents the coordinates of that location in ETRS89 format.
- Return type:
LocationTuple