hholzgra / toner

fork of Stamen Toner style to be used with Osm2pgsql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toner for Osm2pgsql Databases – This is a Fork

This is a fork of the map style "Toner" by Stamen Design. The original style expected an Imposm database. This fork contains adaptions to be useable with an PostGIS database which was imported using Osm2pgsql.

Changes between the original and the fork:

  • use Osm2pgsql
  • don't import shapefiles into the database
  • replace proprietary Arial font by free Noto font (that's why this is a hard fork with an entirely rewritten Git history)

Maintained Styls

Some styles in this repository are unmaintained (and broken). The following styles are maintained:

Toner

"Toner" is the name of Stamen's black and white map tiles. It was originally designed for the Dotspotting project by Geraldine Sarmiento, although many others have been involved since.

The original Toner was developed as part of Stamen's Citytracking initiative, funded by the Knight Foundation. The old repository can be found here, for historical interest.

Toner screenshot

Developing and Deploying

Prerequisites

  • PostgreSQL
  • PostGIS
  • Node.js
  • CartoCSS >= 0.18.0
  • GDAL
  • Python
  • Python bindings for GDAL

Optional dependencies for style development:

  • Kosmtik (you can also manually render images using Nik4 after each modification if you prefer that approach)

Debian/Ubuntu: nodejs gdal-bin python-gdal nodejs-carto

Toner Itself

  • Set up a database. See the guides at switch2osm.org/ for further information. This map style expects a database named gis and accesses using the peer authentication method (i.e. the user which runs Kosmtik/Nik4/the tile server has to have read permissions on the tables of that database.
  • Clone this repo
  • Run scripts/get-shapefiles.py to download many shape files from Natural Earth and some from openstreetmapdata.com
  • Install Kosmtik (it can be installed outside this directory)
  • Start Kosmtik by KOSMTIK_DIR/index.js serve toner.mml. You can now browse the map

If you just want to deploy this style, you don't need Kosmtik at all. Just run carto -a $(mapnik-config -v) toner.mml > toner.xml to generate the Mapnik XML.

License

See the LICENSE file. The fonts have different licenses, see the files at fonts/.

About

fork of Stamen Toner style to be used with Osm2pgsql

License:ISC License


Languages

Language:CartoCSS 47.3%Language:Python 25.9%Language:PLpgSQL 14.7%Language:Makefile 12.0%Language:Dockerfile 0.1%