Baremaps
Baremaps is a toolkit for creating Mapbox vector tiles from OpenStreetMap and other data sources. The project is licensed under Apache License 2.0 and supported by Camptocamp.
It is inspired by Osmosis, but it comes with additional features, such as the ability to:
- Process data in parallel with the Stream API introduced in Java 8
- Import data faster with the COPY API of Postgresql
- Create postgis geometries on the fly with JTS
- Create and serve customized Mapbox Vector Tiles
On the longer run, the aim of the project is to work with a variety of data sources in order to create highly specialized and customized maps.
Preview
Installation
In order to run Baremaps, you first need to install Java 8 or a later version. SDKMAN provides a convenient Command Line Interface (CLI) to install and upgrade Java.
To install baremaps, download and unzip the latest release.
Then, add the /bin
folder to your PATH
variable:
wget https://github.com/baremaps/baremaps/releases/latest/download/baremaps.zip
unzip baremaps.zip
export PATH=$PATH:`pwd`/baremaps/bin
Calling the baremaps
command should now result in an output similar to the following:
Usage: baremaps [COMMAND]
A toolkit for producing vector tiles.
Commands:
import Import OpenStreetMap data in the Postgresql database.
update Update OpenStreetMap data in the Postgresql database.
export Export vector tiles from the Postgresql database.
serve Serve vector tiles from the the Postgresql database.
In order to run Baremaps, you need to setup a postgis database. The following docker image will allow you to jump start this installation:
docker run \
--name baremaps-postgis \
--publish 5432:5432 \
-e POSTGRES_DB=baremaps \
-e POSTGRES_USER=baremaps \
-e POSTGRES_PASSWORD=baremaps \
-d baremaps/postgis:latest
You can then stop and start the container with the following commands:
docker stop baremaps-postgis
docker start baremaps-postgis
Quickstart
Start with the OpenStreetMap example, which introduces the Baremap toolkit and shows how to produce high resolution vector tiles.
Additional examples illustrate how to import other datasets in postgis to produce different kind of vector tiles.
- The NaturalEarth example shows how to produce low resolution vector tiles.
- The Contour example shows how to produce contour lines from a digital elevation model (DEM).
- The Buildings example shows how to 3D buildings from openstreetmap data.
Contributing
Contributions are welcome and encouraged. Please,checkout our code of conduct and contributing guidelines.