Swissalti3d is a precise elevation data (0.5m or 2m step) available freely as opendata.
I have started investigating how to add support for it in Graphhopper. I would be glad to have feedback and maintainer guidance on how to do that in a great way.
If there is interest for it by the maintainers, my plan is to have it merged into graphhopper mainstream.
Otherwise it would stay in a fork, available for anyone interested in it.
Here are some insights / details following my primary investigation.
The datasource: opendata Swissalti3d
Cloud Optimized Geotiff (COG), LZW compression
0.5 m COG: ~ 26 MB / tile, 770 GB / full coverage
2 m COG: ~ 1 MB / tile, 44 GB / full coverage
Projection: LV95 (EPSG:2056)
Downloading all tiles:
Select entire dataset + download csv with the URLS for all the tiles
Example of tiles from the CSV (these are 2m steps):
Size is 500, 500
Coordinate System is:
PROJCRS[“CH1903+ / LV95”,
SCOPE[“Cadastre, engineering survey, topographic mapping (large and medium scale).”],
Data axis to CRS axis mapping: 1,2
Origin = (2501000.000000000000000,1121000.000000000000000)
Pixel Size = (2.000000000000000,-2.000000000000000)
Image Structure Metadata:
Upper Left ( 2501000.000, 1121000.000) ( 6d 9’21.66"E, 46d14’ 3.78"N)
Lower Left ( 2501000.000, 1120000.000) ( 6d 9’22.42"E, 46d13’31.40"N)
Upper Right ( 2502000.000, 1121000.000) ( 6d10’ 8.32"E, 46d14’ 4.31"N)
Lower Right ( 2502000.000, 1120000.000) ( 6d10’ 9.08"E, 46d13’31.93"N)
Center ( 2501500.000, 1120500.000) ( 6d 9’45.37"E, 46d13’47.86"N)
Band 1 Block=128x128 Type=Float32, ColorInterp=Gray
Minimum=372.139, Maximum=372.141, Mean=372.140, StdDev=0.000
- figure out the tiling naming conventions of Swissalti3d
- create a Swissalti3dElevationProvider on the model of CGIARProvider
I am thinking of adding the dependency to the small proj4j lib GitHub - locationtech/proj4j: Java port of the Proj.4 library for coordinate reprojection
and do reprojection at the lookup time
There is already a Tiff reader in Graphhopper, I hope I can use it directly.
I am open to your feedback.
If someone want to directly participate, also let me know.