Skip to content

Commit

Permalink
#44 add mountain peaks from osm
Browse files Browse the repository at this point in the history
  • Loading branch information
clhenrick committed Nov 3, 2015
1 parent 85659a0 commit 5437573
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 2 deletions.
58 changes: 58 additions & 0 deletions icons/triangle-18.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions imposm3_mapping.json
Expand Up @@ -189,6 +189,64 @@
}
}
},
"mountain_peaks": {
"fields": [
{
"type": "id",
"name": "osm_id",
"key": null
},
{
"type": "geometry",
"name": "geometry",
"key": null
},
{
"type": "string",
"name": "name",
"key": "name"
},
{
"type":"string",
"name": "elev",
"key": "ele"
},
{
"type": "mapping_value",
"name": "type",
"key": null
}
],
"type":"point",
"mappings": {
"type": {
"mapping": {
"natural": [
"peak",
"volcano",
"saddle"
],
"tourism":[
"viewpoint"
],
"man_made":[
"tower",
"water_tower",
"monitoring_station",
"survey_point",
"cairn"
]
}
},
"elev": {
"mapping": {
"ele" : [
"__any__"
]
}
}
}
},
"buildings": {
"fields": [
{
Expand Down
24 changes: 24 additions & 0 deletions labels.mss
Expand Up @@ -51,6 +51,30 @@ Map {
buffer-size: 128;
}

#mountain_peaks {
[type='peak'] {
shield-name: [name];
shield-face-name: @text_font_water;
shield-size: @text_font_size_xxsm;
shield-file: url('icons/triangle-18.svg');
shield-transform: scale(0.5,0.5);
shield-unlock-image: true;
shield-avoid-edges: true;
shield-fill: @label_color_physical;
shield-halo-fill: @label_color_physical_halo;
shield-halo-radius: 1;
shield-halo-comp-op: overlay;
shield-min-distance: 2;
shield-placement-type: simple;
shield-placements: 'NE,SW,NW,SE,E,W';
shield-text-dy: 5;
shield-text-dx: 5;
shield-min-distance: 100;
shield-wrap-width: 30;
shield-line-spacing: 0;
}
}

#minor_road_labels,
#major_road_labels,
{
Expand Down
23 changes: 21 additions & 2 deletions terrain-classic.yml
Expand Up @@ -3,7 +3,7 @@
name: 'Terrain Classic'
description: ''
attribution: 'Map Data © OpenStreetMap'
center: [-99.13, 19.43, 11]
center: [ 8.33, 46.83, 10]
format: png
interactivity: false
minzoom: 0
Expand Down Expand Up @@ -1052,7 +1052,26 @@ Layer:
<<: *shapefile
file: shp/continents_900913.shp

# ---- Aries Places ----------------------------------------------------
# ---- Mountain Peaks -----------------
- <<: *layer
name: mountain_peaks
id: mountain_peaks
properties:
minzoom: 10
Datasource:
<<: *postgis
geometry_field: geometry
table: >
(
SELECT
name,
type,
geometry
FROM osm_mountain_peaks
WHERE geometry && !bbox!
) AS _
# ---- Aries Places ----------------------------------------------------

- <<: *layer
name: aries-places-labels
Expand Down

0 comments on commit 5437573

Please sign in to comment.