streetlevel.geo
- create_bounding_box_around_point(lat, lon, radius)
Creates a square bounding box around a point.
- Parameters:
lat (float) – Latitude of the center point.
lon (float) – Longitude of the center point.
radius (float) – Shortest distance from the center point to the edges of the square.
- Returns:
Latitude and longitude of the NW and SE points.
- Return type:
Tuple[Tuple[float, float], Tuple[float, float]]
- get_bearing(lat1, lon1, lat2, lon2)
Returns the bearing from point 1 to point 2.
- Parameters:
lat1 (float) – Latitude of point 1.
lon1 (float) – Longitude of point 2.
lat2 (float) – Latitude of point 2.
lon2 (float) – Longitude of point 2.
- Returns:
The bearing in radians.
- Return type:
float
- get_geoid_height(lat, lon)
Returns the EGM2008 geoid height at a WGS84 coordinate.
- Parameters:
lat (float) – Latitude.
lon (float) – Longitude.
- Returns:
Geoid height in meters.
- Return type:
float
- opk_to_rotation(omega, phi, kappa)
Creates a SciPy rotation object from omega/phi/kappa angles.
- Parameters:
omega (float)
phi (float)
kappa (float)
- Return type:
Rotation
- tile_coord_to_wgs84(x, y, zoom)
Converts XYZ tile coordinates to WGS84 coordinates.
- Parameters:
x (float) – X coordinate.
y (float) – Y coordinate.
zoom (int) – Z coordinate.
- Returns:
WGS84 coordinates.
- Return type:
Tuple[float, float]
- wgs84_to_isn93(lat, lon)
Converts WGS84 coordinates to ISN93 coordinates.
- Parameters:
lat (float) – Latitude.
lon (float) – Longitude.
- Returns:
ISN93 coordinates.
- Return type:
Tuple[float, float]
- wgs84_to_tile_coord(lat, lon, zoom)
Converts WGS84 coordinates to XYZ coordinates.
- Parameters:
lat (float) – Latitude.
lon (float) – Longitude.
zoom (int) – Z coordinate.
- Returns:
The X and Y coordinates.
- Return type:
Tuple[int, int]