Skip to content

Commit

Permalink
Replace road shields with SVGs
Browse files Browse the repository at this point in the history
Fixes gravitystorm#693
Fixes gravitystorm#680
Fixes gravitystorm#203
Fixes gravitystorm#202 (mostly)
Fixes gravitystorm#146 (mostly)

Cross-reference gravitystorm#294 mapnik/mapnik#2020

Starts organization for gravitystorm#508

Replace existing PNG road shields with new SVG ones. This allows for easier adjustment of colour and width as well as sharper high-resolution rendering.

At the same time, a number of other shield related bugs are fixed.

To aid in organization, a new shields directory is created.
  • Loading branch information
pnorman committed Jul 3, 2014
1 parent 7c56d82 commit 6ef1a9a
Show file tree
Hide file tree
Showing 97 changed files with 897 additions and 22 deletions.
4 changes: 2 additions & 2 deletions project.mml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@
],
"Datasource": {
"type": "postgis",
"table": " (select way,highway,ref,char_length(ref) as length\n from planet_osm_roads\n where highway in ('motorway','trunk','primary','secondary')\n and ref is not null\n and char_length(ref) between 1 and 8\n ) as roads_text_ref_low_zoom",
"table": " (select way,highway,ref,char_length(ref) as length\n from planet_osm_roads\n where highway in ('motorway','trunk','primary','secondary')\n and ref is not null\n and char_length(ref) between 1 and 11\n ) as roads_text_ref_low_zoom",
"extent": "-20037508,-20037508,20037508,20037508",
"key_field": "",
"geometry_field": "way",
Expand Down Expand Up @@ -1436,7 +1436,7 @@
],
"Datasource": {
"type": "postgis",
"table": " (select way,coalesce(highway,aeroway) as highway,ref,char_length(ref) as length,\n case when bridge in ('yes','true','1') then 'yes'::text else 'no'::text end as bridge\n from planet_osm_line\n where (highway is not null or aeroway is not null)\n and ref is not null\n and char_length(ref) between 1 and 8\n ) as roads_text_ref",
"table": " (select way,coalesce(highway,aeroway) as highway,ref,char_length(ref) as length,\n case when bridge in ('yes','true','1') then 'yes'::text else 'no'::text end as bridge\n from planet_osm_line\n where (highway is not null or aeroway is not null)\n and ref is not null\n and char_length(ref) between 1 and 11\n ) as roads_text_ref",
"extent": "-20037508,-20037508,20037508,20037508",
"key_field": "",
"geometry_field": "way",
Expand Down
40 changes: 20 additions & 20 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2124,18 +2124,17 @@
}

#roads-text-ref-low-zoom {
[highway = 'motorway'][length < 9] {
[highway = 'motorway'][length < 12] {
[zoom >= 10][zoom < 13] {
shield-name: "[ref]";
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/mot_shield[length].png");
shield-file: url("symbols/shields/mot_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
[length = 7] { shield-file: url('symbols/mot_shield6.png'); }
[length = 8] { shield-file: url('symbols/mot_shield7.png'); }
shield-clip: false;
}
}

Expand All @@ -2144,49 +2143,50 @@
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/tru_shield[length].png");
shield-file: url("symbols/shields/tru_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-clip: false;
}

[highway = 'primary'][zoom >= 11][zoom < 13] {
shield-name: "[ref]";
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/pri_shield[length].png");
shield-file: url("symbols/shields/pri_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-clip: false;
}

[highway = 'secondary'][zoom >= 12][zoom < 13] {
shield-name: "[ref]";
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/sec_shield[length].png");
shield-file: url("symbols/shields/sec_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-clip: false;
}
}

#roads-text-ref {
[highway = 'motorway'][length < 9] {
[highway = 'motorway'][length < 12] {
[zoom >= 13] {
shield-name: "[ref]";
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/mot_shield[length].png");
shield-file: url("symbols/shields/mot_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-avoid-edges: true;
[length = 7] { shield-file: url('symbols/mot_shield6.png'); }
[length = 8] { shield-file: url('symbols/mot_shield7.png'); }
shield-clip: false;
}
}

Expand All @@ -2195,47 +2195,47 @@
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/tru_shield[length].png");
shield-file: url("symbols/shields/tru_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-avoid-edges: true;
shield-clip: false;
}

[highway = 'primary'][zoom >= 13] {
shield-name: "[ref]";
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/pri_shield[length].png");
shield-file: url("symbols/shields/pri_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-avoid-edges: true;
shield-clip: false;
}

[highway = 'secondary'][bridge = 'no'][zoom >= 13] {
shield-name: "[ref]";
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/sec_shield[length].png");
shield-file: url("symbols/shields/sec_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-avoid-edges: true;
shield-clip: false;
}

[highway = 'tertiary'][bridge = 'no'][zoom >= 13] {
shield-name: "[ref]";
shield-size: 10;
shield-fill: #fff;
shield-placement: line;
shield-file: url("symbols/ter_shield[length].png");
shield-file: url("symbols/shields/ter_shield[length].svg");
shield-spacing: 750;
shield-min-distance: 30;
shield-face-name: @bold-fonts;
shield-avoid-edges: true;
shield-clip: false;
}

[highway = 'unclassified'],
Expand Down
Binary file removed symbols/mot_shield1.png
Binary file not shown.
Binary file removed symbols/mot_shield2.png
Binary file not shown.
Binary file removed symbols/mot_shield3.png
Binary file not shown.
Binary file removed symbols/mot_shield4.png
Binary file not shown.
Binary file removed symbols/mot_shield5.png
Binary file not shown.
Binary file removed symbols/mot_shield6.png
Binary file not shown.
Binary file removed symbols/mot_shield7.png
Binary file not shown.
Binary file removed symbols/mot_shield8.png
Binary file not shown.
Binary file removed symbols/pri_shield1.png
Binary file not shown.
Binary file removed symbols/pri_shield2.png
Binary file not shown.
Binary file removed symbols/pri_shield3.png
Binary file not shown.
Binary file removed symbols/pri_shield4.png
Binary file not shown.
Binary file removed symbols/pri_shield5.png
Binary file not shown.
Binary file removed symbols/pri_shield6.png
Binary file not shown.
Binary file removed symbols/pri_shield7.png
Binary file not shown.
Binary file removed symbols/pri_shield8.png
Binary file not shown.
Binary file removed symbols/sec_shield1.png
Binary file not shown.
Binary file removed symbols/sec_shield2.png
Binary file not shown.
Binary file removed symbols/sec_shield3.png
Binary file not shown.
Binary file removed symbols/sec_shield4.png
Binary file not shown.
Binary file removed symbols/sec_shield5.png
Binary file not shown.
Binary file removed symbols/sec_shield6.png
Binary file not shown.
Binary file removed symbols/sec_shield7.png
Binary file not shown.
Binary file removed symbols/sec_shield8.png
Binary file not shown.
5 changes: 5 additions & 0 deletions symbols/shields/mot_shield1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield10.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield11.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield2.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield3.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield4.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield5.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield6.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield7.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield8.svg
17 changes: 17 additions & 0 deletions symbols/shields/mot_shield9.svg
5 changes: 5 additions & 0 deletions symbols/shields/pri_shield1.svg
17 changes: 17 additions & 0 deletions symbols/shields/pri_shield10.svg
17 changes: 17 additions & 0 deletions symbols/shields/pri_shield11.svg
Loading

0 comments on commit 6ef1a9a

Please sign in to comment.