/lyrk-mapstyle

The legendary map style finally open sourced

Primary LanguageCartoCSSBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Lyrk Map Style

The Lyrk OpenStreetMap Style is based on the OSM Bright Style and is used on the Accomodation Map and on many more.

Installation

The style is based on the imposm version of OSM Bright, thus it needs imposm3 for importing the data. The mapping file for imposm is located under imposm/mapping.json. The database can be imported by running imposm3 import -read germany-latest.osm.pbf -write -mapping imposm/mapping.json -connection postgis://localhost/osm_imposm -deployproduction.

The mapnik.xml can be generated using magnacarto or kosmtik or tilemill (tileoven).

Magnacarto

The paths to the shape and font directory have to be set to the project path inside the magnacarto configuration. The XML output path has to be set to the project path or you will have problems reading the GeoJSON files.

Kosmtik

In the localconfig.json a rule has to be added in order to be able to read the raster files.

{
	"where": "Layer",
	"if": {
		"geometry": "raster"
	},
	"then": {
		"Datasource.type": "raster"
	}
}

Shape Files

The following files need to be downloaded and stored inside the shape directory:

Raster Files

Optional: hillshanding and areal imagery can be added for nicer colors. Those files need to be stored inside the raster directory.


Deutsche Version

Der Lyrk-Mapstyle ist ein OpenStreetMap-Kartenstyle, der auf dem OSM-Bright Style aufsetzt und z.B. auf der Unterkunftskarte benutzt wird.

Installation

Der Style setzt auf der imposm-Version von OSM Bright auf, setzt also auf der Datenbankseite imposm3 voraus. Das Mappingfile dazu findet sich unter imposm/mapping.json. Die Datenbank kann also z.B. mit imposm3 import -read germany-latest.osm.pbf -write -mapping imposm/mapping.json -connection postgis://localhost/osm_imposm -deployproduction importiert werden.

Zum Editieren und Erzeugen der mapnik.xml kann entweder magnacarto oder kosmtik oder or tilemill (tileoven) verwendet werden.

Magnacarto

Bei Magnacarto ist zu beachten, dass die Pfade zu den shape- und font-Verzeichnissen in der magnacarto-Konfiguration auf das Projektverzeichnis gesetzt werden sollten. Außerdem muss das XML-Output-Verzeichnis momentan auf das Projektverzeichnis gesetzt werden, weil es sonst Probleme beim Lesen von GeoJSON-Dateien gibt.

Kosmtik

Im localconfig.json-File solle folgende Regel eingefügt werden, damit die Rasterfiles gelesen werden können.

{
	"where": "Layer",
	"if": {
		"geometry": "raster"
	},
	"then": {
		"Datasource.type": "raster"
	}
}

Shape Files

Folgende Shapefiles sollten heruntergeladen und im shape verzeichnis ausgepackt werden:

Raster Files

Optional können Hillshading und Satellitenbilder zur schöneren Farbgebung mit eingebunden werden. Diese Dateien gehören ins raster Verzeichnis.