Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Remove old raster styles
Russ Garrettece2d1692eb0
diff --git a/Makefile b/Makefiledeleted file mode 100644index 8a6141a..0000000--- a/Makefile+++ /dev/null@@ -1,15 +0,0 @@-SOURCES = $(wildcard *.mss)-OBJECTS = $(SOURCES:.mss=.xml)--%.xml: %.mml %.mss- magnacarto -mml $< >$@--all: clean config $(OBJECTS)--config: layers.yml- python ./util/generate_config.py ./layers.yml--clean:- rm -f *.mml *.xml--.PHONY: config cleandiff --git a/README.md b/README.mdindex c9f7baf..0bbb10c 100644--- a/README.md+++ b/README.md@@ -1,9 +1,4 @@This is the style and mapping configuration for [OpenInfraMap](https://openinframap.org).-The .mss (CartoCSS) files are transformed to Mapnik XML using Magnacarto.-The [mapping.yml](mapping.yml) file controls how the OSM subset is imported with[imposm3](https://imposm.org/docs/imposm3/latest/).--It's currently quite tricky to test changes here, but I'm working on a Docker-based-system to make this easier.diff --git a/layers.yml b/layers.ymldeleted file mode 100644index 6a7f7f1..0000000--- a/layers.yml+++ /dev/null@@ -1,111 +0,0 @@-- name: power- layers:- - name: line- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, tunnel, location, frequency, type, name, line,- ref, char_length(ref) AS ref_len,- convert_voltage(voltage) / 1000 AS voltage, operator- FROM osm_power_lines- WHERE geometry && !BBOX!"- geometry: linestring- - name: tower- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, type, name, ref, operator- FROM osm_power_tower- WHERE geometry && !BBOX!"- geometry: point- - name: substation- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, name,- convert_voltage(voltage) / 1000 AS voltage, substation, operator- FROM substation- WHERE geometry && !BBOX!"- geometry: linestring- - name: substation_point- query: "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, name,- convert_voltage(voltage) / 1000 AS voltage,- substation- FROM substation- WHERE geometry && !BBOX!- "- geometry: point- - name: plant- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, name, operator,- convert_power(output)/1e6 AS output, source,- plant_label(name, output, source) AS label- FROM power_plant- WHERE geometry && !BBOX!"- geometry: linestring- - name: plant_point- query: "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, name,- convert_power(output)/1e6 AS output, source,- plant_label(name, output, source) AS label- FROM power_plant- WHERE geometry && !BBOX!- "- geometry: point- - name: generator- query: "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, name, operator,- convert_power(output)/1e3 AS output, source, type, ref- FROM osm_power_generator- WHERE geometry && !BBOX!"- geometry: geometry- - name: transformer- query: "SELECT osm_id AS gid, ST_AsBinary(ST_Centroid(geometry)) AS geom, name- FROM osm_power_switchgear- WHERE type = 'transformer'- AND geometry && !BBOX!"- geometry: point-- name: telecoms- layers:- - name: communication_line- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, operator, name, location- FROM osm_comms_cable- WHERE geometry && !BBOX!"- geometry: linestring- - name: data_center- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, operator, name, ref- FROM osm_data_center- WHERE geometry && !BBOX!"- geometry: linestring- - name: mast- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, operator, name, ref- FROM osm_mast- WHERE (type = 'communications_tower'- OR tower_type IN ('communication', 'radio', 'antenna'))- AND geometry && !BBOX!- "- geometry: point-- name: petroleum- layers:- - name: pipeline- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, operator, name, location- FROM osm_pipeline- WHERE (substance IN ('natural_gas', 'gas', 'oil', 'fuel', 'cng')- OR type IN ('natural_gas', 'gas', 'oil', 'fuel', 'cng'))- AND geometry && !BBOX!"- geometry: linestring- - name: well- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, operator, name- FROM osm_petroleum_well- WHERE geometry && !BBOX!"- geometry: point- - name: site- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, name, operator- FROM osm_petroleum_site- WHERE geometry && !BBOX!"- geometry: linestring-- name: water- layers:- - name: pipeline- query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, operator, name, location- FROM osm_pipeline- WHERE (substance = 'water' OR type = 'water')- AND geometry && !BBOX!"- geometry: linestring-#- name: microwave_hft-# layers:-# - name: microwave_link-# query: "SELECT osm_id AS gid, ST_AsBinary(geometry) AS geom, name AS operator, ref, type,-# round(ST_Length(ST_Transform(geometry, 4326)::geography)/1000) AS length-# FROM microwave_link, microwave_operator-# WHERE microwave_operator.id = microwave_link.operator-# AND geometry && !BBOX!"-# geometry: linestringdiff --git a/microwave_hft.mss b/microwave_hft.mssdeleted file mode 100644index 3c0fab3..0000000--- a/microwave_hft.mss+++ /dev/null@@ -1,25 +0,0 @@-@font_face: "DejaVu Sans Book";--#microwave_link [type = 'finance'] {- line-color: #009C1B;- line-width:1;-- [zoom > 10] {- name/text-size: 10;- [zoom > 12] {- name/text-size: 14;- }- name/text-placement: line;- name/text-halo-radius: 2;- name/text-halo-fill: rgba(255,255,255,0.8);- name/text-face-name: @font_face;- name/text-fill: black;- name/text-min-path-length: 100;- name/text-name: "[operator]";- [zoom > 12] {- name/text-name: "[operator] + ' (' + [ref] + ', ' + [length] + 'km)'"- }- name/text-min-distance: 10;- name/text-dy: -9;- }-}diff --git a/petroleum.mss b/petroleum.mssdeleted file mode 100644index ba1b2ca..0000000--- a/petroleum.mss+++ /dev/null@@ -1,52 +0,0 @@-@font_face: "DejaVu Sans Book";--#pipeline {- line-color: brown;- line-width:1;-- [zoom > 6] {- text-size: 10;- text-placement: line;- text-halo-radius: 2;- text-halo-fill: rgba(255,255,255,0.8);- text-face-name: @font_face;- text-fill: black;- text-min-path-length: 100;- text-name: "[name]";- }-}--#well {- marker-fill: brown;- marker-line-width: 0;- marker-width: 2;- marker-height: 2;-- [zoom > 9] {- marker-width: 10;- marker-height: 10;- text-placement-type: simple;- text-placements: "N,S,E,W,NE,SE,NW,SW,12,10,8";- text-halo-radius: 2;- text-halo-fill: rgba(255,255,255,0.8);- text-face-name: @font_face;- text-fill: black;- text-name: "[name]";- }-}--#site {- line-color: brown;- line-width: 3;- [zoom > 8] {- text-size: 10;- text-halo-radius: 2;- text-halo-fill: rgba(255,255,255,0.8);- text-face-name: @font_face;- text-fill: black;- text-name: "[name]";- [operator != ""] {- text-name: "[name] + ' (' + [operator] + ')'";- }- }-}diff --git a/power.mss b/power.mssdeleted file mode 100644index f4121b8..0000000--- a/power.mss+++ /dev/null@@ -1,373 +0,0 @@-@font_face: "DejaVu Sans Book";--@unknown: #7A7A85;-@v10: #0000B5;-@v25: #00B500;-@v50: #B58D00;-@v100: #B55D00;-@v200: #B50000;-@v300: #B500B1;-@hvdc: #4E01B5;--@tunnel_case: #7C4544;-@busbar_case: #ABA668;-@power_pole: black;-@station_outline: #593815;-@text_halo: rgba(230,230,230,0.9);---#power_line::case[tunnel=1] {- line-color: @tunnel_case;- [zoom > 7] {- line-width: 3;- }- [zoom > 11] {- line-width: 8;- }- [zoom > 15] {- line-width: 15;- }- line-join: round;- line-cap: round;-}--#power_line::case[line="busbar"][zoom > 14] {- line-color: @busbar_case;- line-width: 5;-}--#power_line::fill [frequency != "0"] {- // AC power lines- line-join: round;- line-cap: round;-- [location="underground"][tunnel != 1],- [location="underwater"][tunnel != 1] {- line-dasharray: 10, 5;- }-- [voltage = null], [voltage < 10] {- [zoom >= 10] {- line-color: @unknown;- line-width: 1;- }- }-- [voltage >= 10][voltage < 25] {- [zoom >= 9] {- line-width:1;- line-color: @v10;- }- }- [voltage >= 25][voltage < 50] {- [zoom >= 9] {- line-width:1;- line-color: @v25;- }- }-- [voltage >= 50][voltage < 100] {- [zoom >= 9] {- line-width: 1;- line-color: @v50;- }- }-- [voltage >= 100][voltage < 200] {- [zoom >= 6] {- line-color: @v100;- line-width:1;- }- [zoom >= 9][line=""] {- line-color: @v100;- line-width:2;- }- }-- [voltage >= 200][voltage < 300] {- [zoom >= 6] {- line-color: @v200;- line-width: 1;- }- [zoom >= 9][line=""] {- line-color: @v200;- line-width: 2;- }- }-- [voltage >= 300] {- line-color: @v300;- line-width: 1;- [zoom >= 4][line=""] {- line-width: 2;- }- [zoom >= 9][line=""] {- line-width: 3;- }- }-}--#power_line::fill [frequency = "0"] {- // HVDC interconnectors- line-color: @hvdc;- line-width: 1;- line-dasharray: 10, 5;- [zoom >= 3] {- line-color: @hvdc;- line-width: 2;- }- [zoom >= 8] {- line-color: @hvdc;- line-width: 4;- }-}--#power_tower[zoom>14][type="tower"] {- marker-file: url('symbols/power_tower.svg');- marker-width: 8;-}--#power_tower[zoom>14][type="pole"] {- marker-type: ellipse;- marker-fill: @power_pole;- marker-line-width: 0;- marker-width: 4;-}--/* Render substations as circles at lower zooms */-#substation_point[zoom = 8][substation != "transition"][voltage >= 200],- #substation_point[zoom >= 9][zoom < 11][substation != "transition"][voltage >= 100],- #substation_point[zoom >= 11][zoom < 13][substation != "transition"][voltage >= 25] {- marker-type: ellipse;-- /* Mapnik is extremely choosy about this rule ordering, beware. */- [voltage >= 300] {- marker-line-width: 2;- marker-line-color: black;- marker-fill: @v300;- marker-width: 15;- [zoom = 8] {- marker-width: 8;- }- }- [voltage >= 200][voltage < 300] {- marker-line-width: 2;- marker-line-color: black;- marker-fill: @v200;- marker-width: 12;- [zoom = 8] {- marker-width: 8;- }- }- [voltage >= 100][voltage < 200] {- marker-line-width: 2;- marker-line-color: black;- marker-fill: @v100;- marker-width: 10;- }- [voltage >= 50][voltage < 100] {- marker-line-width: 2;- marker-line-color: black;- marker-fill: @v50;- marker-width: 5;- }- [voltage >= 25][voltage < 50] {- marker-line-width: 1;- marker-line-color: black;- marker-fill: @v25;- marker-width: 3;- }-}--#substation::outline[zoom >= 13] {- line-color: @station_outline;- line-width:3;-}--/* Fill substations with their corresponding colour at medium zooms */-#substation::body[zoom >= 13][zoom < 15] {- [voltage >= 25][voltage < 50] {- polygon-fill: @v25;- }- [voltage >= 50][voltage < 100] {- polygon-fill: @v50;- }- [voltage >= 100][voltage < 200] {- polygon-fill: @v100;- }- [voltage >= 200][voltage < 300] {- polygon-fill: @v200;- }- [voltage >= 300] {- polygon-fill: @v300;- }-}--/* Render substations mapped as points */-#substation["mapnik::geometry_type" = 1][zoom >= 13] {- marker-width:5;- marker-type: ellipse;- marker-line-width: 1;- marker-line-color: black;- [voltage <= 25], [voltage = null] {- marker-fill: @unknown;- }- [voltage >= 25][voltage < 50] {- marker-fill: @v25;- }- [voltage >= 50][voltage < 100] {- marker-fill: @v50;- }- [voltage >= 100][voltage < 200] {- marker-fill: @v100;- }- [voltage >= 200][voltage < 300] {- marker-fill: @v200;- }- [voltage >= 300] {- marker-fill: @v300;- }-}---#power_plant_point[zoom < 13][zoom > 5][output > 100],- #power_plant_point[zoom < 13][zoom > 9][output < 100][output > 10],- #power_plant_point[zoom < 13][zoom > 11][output < 10]{- marker-width: 15;- marker-file: url('symbols/power_plant.svg');- [source = "coal"] {- marker-width: 15;- marker-file: url('symbols/power_plant_coal.svg');- }- [source = "geothermal"] {- marker-width: 15;- marker-file: url('symbols/power_plant_geothermal.svg');- }- [source = "hydro"] {- marker-width: 15;- marker-file: url('symbols/power_plant_hydro.svg');- }- [source = "nuclear"] {- marker-width: 15;- marker-file: url('symbols/power_plant_nuclear.svg');- }- [source = "oil"], [source="gas"] {- marker-width: 15;- marker-file: url('symbols/power_plant_oilgas.svg');- }- [source = "solar"] {- marker-width: 15;- marker-file: url('symbols/power_plant_solar.svg');- }- [source = "wind"] {- marker-width: 15;- marker-file: url('symbols/power_plant_wind.svg');- }-- /* Render these on top of substations, as they're- * always next door and the power plant is more important. */- marker-allow-overlap: true;-}--#power_plant[zoom>=13] {- line-color: @station_outline;- line-width:1;-}--#power_generator[source = "wind"][zoom > 10] {- marker-file: url('symbols/power_wind.svg');- marker-width: 10;-}--#power_transformer[zoom > 14] {- marker-file: url('symbols/power_transformer.svg');- marker-width: 10;-}--#substation::label[zoom >= 13],- #substation::label[zoom >= 11][zoom < 13][voltage >= 100]{- text-size: 12;- text-dy: 10;- text-halo-radius: 2;- [zoom >= 14] {- text-halo-radius: 4;- }- text-halo-fill: @text_halo;- text-face-name: @font_face;- text-fill: black;- text-wrap-width: 50;-- [name != ""] {- text-name: "[name]";- }- [voltage > 0][zoom >= 13] {- text-name: "'Substation ' + [voltage] + 'kV'";- [name != ""] {- text-name: "[name] + ' ' + [voltage] + 'kV'";- }- }-}--/* Label power lines- * (but not line=busbar or line=bay)- */-#power_line::label[line = ''] {- text-size: 9;- text-placement: line;- text-halo-radius: 2;- text-dy: 5;- [tunnel=1] {- text-dy:10;- }- text-halo-fill: @text_halo;- text-face-name: @font_face;- text-fill: black;- text-min-path-length: 100;- text-spacing: 700;- [zoom>13] {- text-name: "[name]";- [voltage > 0] {- text-name: "[name] + ' ' + [voltage] + 'kV'";- }- [frequency = "0"] {- text-name: "[name] + ' (HVDC)'"- }- }-}--/* Label power line references as a shield.- * This currently only supports references shorter than 5 characters.- */-#power_line::ref[ref != ''][ref_len < 5][zoom > 11] {- shield-file: url('symbols/power_line_ref.svg');- shield-name: "[ref]";- shield-face-name: @font_face;- shield-fill: black;- shield-size: 9;- shield-placement: line;- shield-spacing: 400;-}--#power_tower::ref[ref != ''][zoom > 15] {- text-size: 9;- text-name: "[ref]";- text-fill: black;- text-face-name: @font_face;- text-halo-fill: @text_halo;- text-halo-radius: 2;-}--#power_plant::label[zoom >= 9][zoom < 12][output > 100],- #power_plant::label[zoom >= 12] {- text-size: 12;- text-dy: 10;- text-halo-radius: 2;- [zoom >= 14] {- text-halo-radius: 4;- }- text-halo-fill: @text_halo;- text-face-name: @font_face;- text-fill: black;- text-wrap-width: 50;- text-name: "[label]";-}diff --git a/telecoms.mss b/telecoms.mssdeleted file mode 100644index c5108d0..0000000--- a/telecoms.mss+++ /dev/null@@ -1,71 +0,0 @@-@font_face: "DejaVu Sans Book";--#data_center::fill {- line-color: #6A37AB;- line-width:1;- polygon-fill: #7D59AB;-}--#data_center::label[zoom > 12] {- text-size: 12;- text-halo-radius: 2;- text-halo-fill: rgba(255,255,255,0.8);- text-face-name: @font_face;- text-fill: black;- text-wrap-width: 50;- text-name: "[name]";-- [operator != ''] {- text-name: "[operator]";- [name != '' ] {- text-name: "[name] + ' (' + [operator] + ')'";- }- }-}--#communication_line {- line-color: blue;- line-width:1;-- [location = 'underground'] {- line-dasharray: 10, 5;- }-- [zoom > 6] {- text-size: 10;- text-placement: line;- text-halo-radius: 2;- text-halo-fill: rgba(255,255,255,0.8);- text-face-name: @font_face;- text-fill: black;- text-min-path-length: 100;- text-name: "[name]";- text-min-distance: 2;- }-}--#mast[zoom > 8] {- marker-file: url('symbols/comms_tower.svg');- marker-width: 8;- [zoom > 10] {- marker-width: 10;- }- [zoom > 12] {- marker-width: 14;- }-- [zoom > 14] {- text-size: 10;- text-placement-type: simple;- text-placements: "E,NE,SE,W,NW,SW";- text-halo-radius: 2;- text-halo-fill: rgba(255,255,255,0.8);- text-face-name: @font_face;- text-fill: black;- text-name: "[name]";-- [operator != ''] {- text-name: "[name] + ' (' + [operator] + ')'";- }- }-}diff --git a/water.mss b/water.mssdeleted file mode 100644index e08f5ca..0000000--- a/water.mss+++ /dev/null@@ -1,17 +0,0 @@-@font_face: "DejaVu Sans Book";--#pipeline {- line-color: #020C94;- line-width:1;-- [zoom > 6] {- text-size: 10;- text-placement: line;- text-halo-radius: 2;- text-halo-fill: rgba(255,255,255,0.8);- text-face-name: @font_face;- text-fill: black;- text-min-path-length: 100;- text-name: "[name]";- }-}