A Python package providing Swiss Topo elevation services and map utilities.
This package exposes functionality for accessing Swiss topographic elevation data, originally from the pyriadne repository.
pip install -e .For development:
pip install -e ".[dev]"from map_services.swisstopo_elevation import get_elevation, get_elevation_batch
# Get elevation for a single point (Zurich coordinates)
elevation = get_elevation(8.5417, 47.3769)
print(f"Elevation: {elevation} meters")
# Get elevation for multiple points
coordinates = [
(8.5417, 47.3769), # Zurich
(7.4474, 46.9480), # Bern
]
elevations = get_elevation_batch(coordinates)
print(f"Elevations: {elevations}")from map_services.swisstopo_elevation import SwissTopoElevationClient
# Create a client instance
client = SwissTopoElevationClient()
# Get elevation for a single point
elevation = client.get_elevation(8.5417, 47.3769)
print(f"Elevation: {elevation} meters")
# Get elevation for multiple points
coordinates = [(8.5417, 47.3769), (7.4474, 46.9480)]
elevations = client.get_elevation_batch(coordinates)
print(f"Elevations: {elevations}")pytestblack map_services testsflake8 map_services testsget_elevation(longitude, latitude): Get elevation for a single coordinate pointget_elevation_batch(coordinates): Get elevation for multiple coordinate points
SwissTopoElevationClient: Main client class for accessing elevation services
MIT License - see LICENSE file for details.
This package contains template/placeholder code. The actual implementation should be copied from the pyriadne repository to provide full functionality.