Skip to content

mytracks/opensnowmap-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains some tools to convert raw data provided by OpenSnowMap to mbtiles file that can be used for example using MapLibre.

Source

Data provided by OpenSnowMap: https://www.opensnowmap.org/download/relief/

Tools

The following tools are used for the conversion:

  • ogr2ogr
  • tippecanoe
  • tile-join

Using the provided Dockerfile you can build a container image with these tools.

Build image:

docker build -t opensnowmap-utils .

Run bash in image:

docker run --rm -ti -v /data:/data opensnowmap-utils

Contours

First you have to extract the file contours2.tar:

tar xvf contours2.tar

The contours MBTiles file is generated using the script generate_mbtiles.sh.

The input to this script are the extracted *.shp.gz files. Each file is unzipped and converted to geojson. Afterwards mbtiles files are generated for various zoom levels. Finally the mbtiles file are merged to a single file (per shape file).

After running this script you have many individual mbtiles files which have to be merged to a single mbtiles file using tile-join.

Hillshades

First you have to extract the file dem_tar.tar:

tar xvf dem_tar.tar

The hillshades are provided as geotiff files (out*.tif) and they must be converted to individual mbtiles files first and finally merged to a single mbtiles file:

for filename in ./out*.tif; do
    gdal_translate -of mbtiles "$filename" "./$(basename "$filename" .tif).mbtiles"
done
tile-join -o dem.mbtiles out*.mbtiles

About

Tools to convert raw data provided by OpenSnowMap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published