Skip to content

Instantly share code, notes, and snippets.

@andrewharvey
Created October 23, 2011 09:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewharvey/1307141 to your computer and use it in GitHub Desktop.
Save andrewharvey/1307141 to your computer and use it in GitHub Desktop.
A wireframe stylesheet written in carto for OSM data
{
"bounds": [
-180,
-85.05112877980659,
180,
85.05112877980659
],
"center": [
0,
0,
8
],
"format": "png",
"interactivity": false,
"minzoom": 0,
"maxzoom": 22,
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Stylesheet": [
"wireframe.mss"
],
"Layer": [
{
"geometry": "linestring",
"name": "way",
"id": "way",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"class": "",
"Datasource": {
"table": "(SELECT way FROM planet_osm_line) AS ways",
"key_field": "",
"geometry_field": "way",
"extent": "",
"type": "postgis",
"host": "localhost",
"port": "5432",
"user": "",
"password": "",
"dbname": ""
}
}
],
"name": "osm-wireframe-bw",
"description": "A black and white wireframe of ways in OSM"
}
/*
* Wireframe stylesheet for OSM data.
*
* Author: Andrew Harvey <andrew.harvey4@gmail.com>
* License: CC0 http://creativecommons.org/publicdomain/zero/1.0/
* To the extent possible under law, the person who associated CC0
* with this work has waived all copyright and related or neighboring
* rights to this work.
*/
#way{
line-color: #000000;
line-opacity: 0.5;
line-join: round;
line-cap: round;
[zoom>11] { line-width: 1; }
[zoom=11] { line-width: 0.8; }
[zoom=10] { line-width: 0.6; }
[zoom=9] { line-width: 0.4; }
[zoom<9] { line-width: 0.2; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment