pandemia.world.location
Module Contents
Classes
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)
A location, for example an area of land or a building.
During a simulation, agents move between locations according to their daily and weekly routines.
Parameters:
- typstr
The type of location, as a string. For example “House” or “Restaurant”.
- coordtuple
A 2-tuple of floats, representing x, y coordinates.
Attributes:
- uuidstr
A universally unique identifier for this location.
- typstr
The type of location, as a string. For example “House” or “Restaurant”.
- coordtuple
A 2-tuple of floats, representing x, y coordinates.
- pandemia.world.location.ETRS89_to_WGS84(coord: LocationTuple) LocationTuple
Convert from ETRS89 grid format to WGS84 lat, lon format.
Parameters:
- coordLocationTuple
A 2-tuple of floats.
Returns:
- new_coordLocationTuple
If coord represents the coordinates of a location in ETRS89 format, then new_coord represents the coordinates of that location in WGS84 format.
- pandemia.world.location.WGS84_to_ETRS89(coord: LocationTuple) LocationTuple
Convert from WGS84 lat, lon format to ETRS89 grid format.
Parameters:
- coordLocationTuple
A 2-tuple of floats.
Returns:
- new_coordLocationTuple
If coord represents the coordinates of a location in WGS84 format, then new_coord represents the coordinates of that location in ETRS89 format.