baremaps / openstreetmap-vecto

General purpose vector tiles and vector style based on OpenStreetMap.
https://www.baremaps.com/
Creative Commons Zero v1.0 Universal
33 stars 6 forks source link
mapbox openstreetmap vecto-tiles

OpenStreetMap Vecto

🚧 🚧 The development of openstreetmap-vecto moved to the Baremaps repository. 🚧 🚧

OpenStreetMap Vecto is a general-purpose configuration for Baremaps. It is used to generate vector tiles and to produce a Mapbox style inspired by OpenStreetMap Carto.

Requirements

The database should be accessible with the following jdbc settings:

jdbc:postgresql://localhost:5432/baremaps?user=baremaps&password=baremaps

Getting started

In order to experiment with OpenStreetMap Vecto, you first need to clone the current repository

git clone git@github.com:baremaps/openstreetmap-vecto.git
cd openstreetmap-vecto/

Assuming that the necessary requirements have been installed, the database can be populated with the following command.

baremaps workflow execute --file workflow.json

The development server can be started with the following command.

baremaps map dev --log-level DEBUG \
  --database 'jdbc:postgresql://localhost:5432/baremaps?user=baremaps&password=baremaps' \
  --tileset 'tileset.json' \
  --style 'style.json'

Editing the tileset

The configuration format used in the tileset.json file extends the TileJSON specification. Simply put, it adds in the ability to describe the vector_tiles and their content with SQL queries that follow the Postgis dialect.

{
  "tilejson": "2.2.0",
  "tiles": [
    "http://localhost:9000/tiles/{z}/{x}/{y}.mvt"
  ],
  "vector_layers": [
    {
      "id": "aerialway",
      "queries": [
        {
          "minzoom": 14,
          "maxzoom": 20,
          "sql": "SELECT id, tags, geom FROM osm_ways_z${zoom} WHERE tags ? 'aerialway'"
        }
      ]
    }
  ]
}

Editing the style

The configuration format used in the style.json follows the Mapbox style specification. Baremaps integrates Maputnik and most of the modifications will take place in the browser.

Tools

Contributing

As a lot remains to be done, contributions and feedbacks are welcome.