https://github.com/lab5e/gotileserver
OSM/OpenMapTile server
https://github.com/lab5e/gotileserver
Last synced: about 1 year ago
JSON representation
OSM/OpenMapTile server
- Host: GitHub
- URL: https://github.com/lab5e/gotileserver
- Owner: lab5e
- Created: 2023-04-07T00:38:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-08T09:07:41.000Z (over 1 year ago)
- Last Synced: 2025-02-28T22:38:48.676Z (over 1 year ago)
- Language: Go
- Size: 19.5 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenMapTile server library
This uses data from [OpenStreetMap](https://www.openstreetmap.org/#map=17/63.43213/10.40691). The OSM data
has usually been converted from PostgreSQL GIS data into bitmap tiles but this is an slightly outdated
technique and [OpenMapTiles](https://openmaptiles.org) is a vector-based solution built on top of OSM data.
The styling is... interesting... There's a lot of hard coded references to external resources so the styles
included in this project has been massaged to point to both the proper tile data and local resources.
## Using custom tilers
The library includes a sample set of tiles from a different library. To add your own tiles follow the guidelines below.
## Building the tiles
The tiles can be rebuilt in a few minutes (a more elaborate description is at https://blog.kleunen.nl/blog/tilemaker-generate-map).
Tools needed:
* Osmium - install with `brew install osmium-tool` on macOS
* [Tilemaker](https://tilemaker.org) - build from the [GitHub sources](https://github.com/systemed/tilemaker)
* wget - pull a suitable data set from [GeoFabrik](http://download.geofabrik.de)
Run the following commands to extract the data into tiles
```shell
wget http://download.geofabrik.de/europe/norway-latest.osm.pbf
osmium extract --bbox=9.78,63.17,10.97,63.56 --set-bounds --strategy=smart norway-latest.osm.pbf --output trondheim.osm.pbf
tilemaker --input trondheim.osm.pbf --output tiles --process [...]/resources/process-openmaptiles.lua \
--config [...]/resources/config-openmaptiles.json
```
The whole process should take three to four minutes on a decent computer.