{"id":43410159,"url":"https://github.com/joe-akeem/contour-tiles","last_synced_at":"2026-02-02T16:46:34.429Z","repository":{"id":62406585,"uuid":"229554756","full_name":"joe-akeem/contour-tiles","owner":"joe-akeem","description":"A docker image to create vector tiles for contour lines and hillshade raster tiles of europe (mbtiles files).","archived":false,"fork":false,"pushed_at":"2024-02-14T16:17:03.000Z","size":2189,"stargazers_count":30,"open_issues_count":5,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-02-14T17:34:29.270Z","etag":null,"topics":["contour-lines","contours","hillshade","mbtile","mbtiles","openstreetmap","osm"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joe-akeem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-12-22T11:03:24.000Z","updated_at":"2023-12-27T21:36:05.000Z","dependencies_parsed_at":"2023-11-08T00:10:27.988Z","dependency_job_id":"d2d82ef9-845e-4e8d-b731-b0379d21375f","html_url":"https://github.com/joe-akeem/contour-tiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joe-akeem/contour-tiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe-akeem%2Fcontour-tiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe-akeem%2Fcontour-tiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe-akeem%2Fcontour-tiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe-akeem%2Fcontour-tiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joe-akeem","download_url":"https://codeload.github.com/joe-akeem/contour-tiles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe-akeem%2Fcontour-tiles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29015408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T16:17:30.374Z","status":"ssl_error","status_checked_at":"2026-02-02T15:58:50.469Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contour-lines","contours","hillshade","mbtile","mbtiles","openstreetmap","osm"],"created_at":"2026-02-02T16:46:33.150Z","updated_at":"2026-02-02T16:46:34.420Z","avatar_url":"https://github.com/joe-akeem.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Countour Lines and Hillshade files for Europe\n\nA docker image to create vector tiles for contour lines and hillshade (relief) raster tiles of europe (mbtiles files).\n\nThe relief and is based on data from [SRTM 90m DEM Digital Elevation Database](http://srtm.csi.cgiar.org) and\n[OpenSlopeMap](https://www.openslopemap.org/).\n\n## Getting it\n\n```bash\ngit clone https://github.com/joe-akeem/contour-tiles.git\n```\n\n## Building the mbtiles files\n\n```bash\ncd contour-tiles\ndocker-compose -f docker-compose-compute.yml build contour-tiles \u0026\u0026 docker-compose -f docker-compose-compute.yml up\n```\n\nThis will build the mbtiles files in the folder `./osm/mbtiles`\n\n## Area\n\nBy default, the Europe area will be covered (defined in `.env`). The configuration for other areas has been prepared in\nthe `.env-*` files. For example, to build the contour tiles for South America, pass the corresponding environment file to\n`docker-compose` as follows:\n\n```bash\ndocker-compose --env-file .env-south-america -f docker-compose-compute.yml up\n```\n\nTo completely customize the area, please use this tool [SRTM Tile Grabber](https://dwtkns.com/srtm/). You'll be able to\nidentify the tiles that will be needed to build your data:\n\n![SRTM Tile example](./img/srtmtile.png)\n\nOn this image, the name of the tile is `srtm_38_03.zip`. X is 38, Y is 03. For example, to compute\nHawaii only, you can export the custom area as environment variables before running `docker-compose`:\n\n```bash\nexport MIN_X=05 MAX_X=06 MIN_Y=08 MAX_Y=09\n```\n\nPlease note that `MIN_Z` and `MAX_Z` are the limit in terms of altitude.\n\nFor a dry run to verify the configuration before launching the whole process run:\n\n```bash\ndocker-compose -f docker-compose-compute.yml config\n```\n\nThen start the building of the tiles as before:\n\n```bash\ndocker-compose -f docker-compose-compute.yml up\n```\n\n## Computing large areas\n\nWith the view to be able to compute areas, many improvements have been done. First of all, the main bottleneck was the use of `gdal_contour`. It's a single core process...\n\nTo be able to overcome this problem, this script can now compute contour using parallelized job. You'll be able to define the number of parallel jobs using\nthe `CONTOUR_JOBS` variables, in the `docker-compose-compute.yml` file. Beware of the fact that you should limit the number of jobs to the number of core\nthat your host has. Moreover, each job will consume a lot of RAM, essentially dependent upon the size of the area. For the default area, i use 8 jobs with 16\nGB free RAM.\n\nLast problem, the long time taken by `gdal_translate`... Adding cache can speed up the process, but don't expect a huge difference. The variable is\n`GDAL_CACHEMAX`, in MB.\n\n## Inspecting the tiles\n\nTo inspect the mbtiles files a local tileserver can be started as follows:\n\n```bash\ndocker-compose up\n```\nThe web interface of the tile server is made available at [localhost:8080](http://localhost:8080).\nA basic style is also available and can be used to view the generated data e.g. as [Vector Tiles](http://localhost:8080/styles/basic/?vector#13.57/46.49646/8.61135).\n\nYou will notice that there are contour lines for 100 meter and for 20 meter equidistance. The 100 meter equidistance lines\nwill start showing from zoom level 10 while the 20 meter equidistance lines are showing from zoom level 13 upwards.\n \nThe contour lines are tagged with a field named `elev` representing the elevation of the contour line in meters above sea level.\n\n\n\u003cimg src=\"./img/relief.png\" width=\"700\" alt=\"relief\"\u003e\n\n## Performances\n\nThe container has been tried with success on an Azure VM, Standard_D8ds_v5 with\na P30 SSD (1To, 5kIOPS). The whole process for Europa took about 30 minutes.\n\nThe container has been used with success on an Azure VM, Standard_HB60-45rs with\na P30 SSD (1To, 5kIOPS). The whole process for *Planet* took about 3 days. Even if\nthis machine had a lot of cores, the RAM was the limiting factor. I had to use\nthese parameters in the compose file :\n\n```\nMIN_X: 01 \nMAX_X: 72\nMIN_Y: 01\nMAX_Y: 24\nMIN_Z: 0\nMAX_Z: 9000\nCONTOUR_JOBS: 8\nGDAL_CACHEMAX: 160000\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe-akeem%2Fcontour-tiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoe-akeem%2Fcontour-tiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe-akeem%2Fcontour-tiles/lists"}