tree: fb0dd56d5a6f89ff20a7374fbb71e9d51172a279 [path history] [tgz]
  1. layers/
  2. queries/
  3. utils/
  4. README.md
  5. style.js
  6. tileset.js
  7. workflow.js
map/README.md

OpenStreetMap Vecto

🚧 🚧 Work in progress 🚧 🚧

This directory contains the configuration files for a general-purpose map. It is used to generate vector tiles and to produce a Mapbox style inspired by OpenStreetMap Carto.

Requirements

A PostgreSQL database with the PostGIS extension should be accessible with the following jdbc settings:

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

Getting started

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.js 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.js file follows the Mapbox style specification. Baremaps integrates Maputnik and most of the modifications will take place in the browser.

Tools

Contributing

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