Skip to content

Commit 438a6c8

Browse files
authored
Merge pull request #91 from max-dn/master
Show sac_scale and via_ferrata
2 parents 33c34d4 + e21b184 commit 438a6c8

File tree

2 files changed

+163
-8
lines changed

2 files changed

+163
-8
lines changed

mapnik/opentopomap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
<StyleName>roads-fill</StyleName>
383383
<StyleName>trams</StyleName>
384384
<Datasource>
385-
<Parameter name="table">(SELECT way,ST_Length(way) AS length,highway,name,service,surface,tracktype,lanes,embankment,oneway,railway FROM planet_osm_line WHERE (!scale_denominator! &gt; 300000) OR ((bridge IS NULL OR bridge = 'no') AND (tunnel IS NULL OR tunnel != 'yes')) AND (highway IS NOT NULL OR railway='tram') ORDER BY (CASE WHEN highway IN ('motorway','trunk') THEN 5 WHEN highway='primary' THEN 1 WHEN highway='secondary' THEN 2 WHEN highway='tertiary' THEN 3 ELSE 4 END) DESC ) AS roads</Parameter>
385+
<Parameter name="table">(SELECT way,ST_Length(way) AS length,highway,name,sac_scale,trail_visibility,via_ferrata_scale,service,surface,tracktype,lanes,embankment,oneway,railway FROM planet_osm_line WHERE (!scale_denominator! &gt; 300000) OR ((bridge IS NULL OR bridge = 'no') AND (tunnel IS NULL OR tunnel != 'yes')) AND (highway IS NOT NULL OR railway='tram') ORDER BY (CASE WHEN highway IN ('motorway','trunk') THEN 5 WHEN highway='primary' THEN 1 WHEN highway='secondary' THEN 2 WHEN highway='tertiary' THEN 3 ELSE 4 END) DESC ) AS roads</Parameter>
386386
<Parameter name="dbname">gis</Parameter>
387387
&postgis-settings;
388388
</Datasource>

mapnik/styles-otm/roads-casing.xml

Lines changed: 162 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,7 @@
293293
<Filter>[highway] = 'track' and [tracktype] = 'grade5'</Filter>
294294
<LineSymbolizer stroke="black" stroke-width="0.5" stroke-dasharray="3,3" />
295295
</Rule>
296-
<Rule>
297-
&maxscale_zoom14;
298-
&minscale_zoom14;
299-
<Filter>([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'bridleway'</Filter>
300-
<LineSymbolizer stroke="black" stroke-width="0.6" stroke-dasharray="1.6,1.6"/>
301-
</Rule>
296+
302297
<Rule>
303298
&maxscale_zoom14;
304299
&minscale_zoom14;
@@ -313,6 +308,89 @@
313308
</Rule>
314309

315310

311+
<!-- pathes -->
312+
313+
<!-- a tiny line for alle pathes to connect the dots -->
314+
315+
<Rule>
316+
&maxscale_zoom14;
317+
&minscale_zoom14;
318+
<Filter>([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'via_ferrata'</Filter>
319+
<LineSymbolizer stroke="black" stroke-width="1" stroke-opacity="0.1"/>
320+
</Rule>
321+
322+
<!-- visible path, sac_scale=T1-2, no ferrata, "normal way" -->
323+
324+
<Rule>
325+
&maxscale_zoom14;
326+
&minscale_zoom14;
327+
<Filter>([trail_visibility] is null or ([trail_visibility]!='no' and [trail_visibility]!='horrible' and [trail_visibility]!='bad')) and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] is null or [sac_scale] = 'hiking' or [sac_scale] = 'mountain_hiking') and (([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'bridleway')</Filter>
328+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.6,1.6"/>
329+
</Rule>
330+
331+
332+
<!-- visible path, sac_scale=T3-4, no ferrata -->
333+
334+
<Rule>
335+
&maxscale_zoom14;
336+
&minscale_zoom14;
337+
<Filter>([trail_visibility] is null or ([trail_visibility]!='no' and [trail_visibility]!='horrible' and [trail_visibility]!='bad')) and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_mountain_hiking' or [sac_scale] = 'alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
338+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.6,1.6,1.6,1.6,1.6,4.5"/>
339+
</Rule>
340+
341+
<!-- visible path, sac_scale=T5-6, no ferrata -->
342+
343+
<Rule>
344+
&maxscale_zoom14;
345+
&minscale_zoom14;
346+
<Filter>([trail_visibility] is null or ([trail_visibility]!='no' and [trail_visibility]!='horrible' and [trail_visibility]!='bad')) and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_alpine_hiking' or [sac_scale] = 'difficult_alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
347+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.6,1.6,1.6,5"/>
348+
</Rule>
349+
350+
<!-- invisible path, sac_scale=T1-2, no ferrata, "normal hidden way" -->
351+
352+
<Rule>
353+
&maxscale_zoom14;
354+
&minscale_zoom14;
355+
<Filter>([trail_visibility]='no' or [trail_visibility]='horrible' or [trail_visibility]='bad') and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] is null or [sac_scale] = 'hiking' or [sac_scale] = 'mountain_hiking') and (([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'bridleway')</Filter>
356+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.6,1.6" stroke-opacity="0.5"/>
357+
</Rule>
358+
359+
360+
<!-- invisible path, sac_scale=T3-4, no ferrata -->
361+
362+
<Rule>
363+
&maxscale_zoom14;
364+
&minscale_zoom14;
365+
<Filter>([trail_visibility]='no' or [trail_visibility]='horrible' or [trail_visibility]='bad') and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_mountain_hiking' or [sac_scale] = 'alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
366+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.6,1.6,1.6,1.6,1.6,4.5" stroke-opacity="0.6"/>
367+
</Rule>
368+
369+
<!-- invisible path, sac_scale=T5-6, no ferrata -->
370+
371+
<Rule>
372+
&maxscale_zoom14;
373+
&minscale_zoom14;
374+
<Filter>([trail_visibility]='no' or [trail_visibility]='horrible' or [trail_visibility]='bad') and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_alpine_hiking' or [sac_scale] = 'difficult_alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
375+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.6,1.6,1.6,5" stroke-opacity="0.6"/>
376+
</Rule>
377+
378+
379+
380+
<!-- ferratas are rendered like visible T5-6 -->
381+
382+
<Rule>
383+
&maxscale_zoom14;
384+
&minscale_zoom14;
385+
<Filter>([highway] = 'via_ferrata') or (([via_ferrata_scale] != null and [via_ferrata_scale] != '0') and ([highway] = 'path' or [highway] = 'footway'))</Filter>
386+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.6,1.6,1.6,5"/>
387+
</Rule>
388+
389+
390+
<!-- end of pathes -->
391+
392+
393+
316394
<!-- zoom 15 -->
317395
<Rule>
318396
&maxscale_zoom15;
@@ -368,12 +446,89 @@
368446
<Filter>[highway] = 'track' and [tracktype] = 'grade5'</Filter>
369447
<LineSymbolizer stroke="black" stroke-width="0.9" stroke-dasharray="4,4" />
370448
</Rule>
449+
450+
<!-- pathes -->
451+
452+
<!-- a tiny line for alle pathes to connect the dots -->
453+
371454
<Rule>
372455
&maxscale_zoom15;
373456
&minscale_zoom17;
374-
<Filter>([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'bridleway'</Filter>
457+
<Filter>([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'via_ferrata'</Filter>
458+
<LineSymbolizer stroke="black" stroke-width="1" stroke-opacity="0.05"/>
459+
</Rule>
460+
461+
<!-- visible path, sac_scale=T1-2, no ferrata, "normal way" -->
462+
463+
<Rule>
464+
&maxscale_zoom15;
465+
&minscale_zoom17;
466+
<Filter>([trail_visibility] is null or ([trail_visibility]!='no' and [trail_visibility]!='horrible' and [trail_visibility]!='bad')) and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] is null or [sac_scale] = 'hiking' or [sac_scale] = 'mountain_hiking') and (([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'bridleway')</Filter>
375467
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.1,2"/>
376468
</Rule>
469+
470+
471+
<!-- visible path, sac_scale=T3-4, no ferrata -->
472+
473+
<Rule>
474+
&maxscale_zoom15;
475+
&minscale_zoom17;
476+
<Filter>([trail_visibility] is null or ([trail_visibility]!='no' and [trail_visibility]!='horrible' and [trail_visibility]!='bad')) and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_mountain_hiking' or [sac_scale] = 'alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
477+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.1,2,1.1,2,1.1,6"/>
478+
</Rule>
479+
480+
<!-- visible path, sac_scale=T5-6, no ferrata -->
481+
482+
<Rule>
483+
&maxscale_zoom15;
484+
&minscale_zoom17;
485+
<Filter>([trail_visibility] is null or ([trail_visibility]!='no' and [trail_visibility]!='horrible' and [trail_visibility]!='bad')) and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_alpine_hiking' or [sac_scale] = 'difficult_alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
486+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.1,2,1.1,8"/>
487+
</Rule>
488+
489+
<!-- invisible path, sac_scale=T1-2, no ferrata, "normal hidden way" -->
490+
491+
<Rule>
492+
&maxscale_zoom15;
493+
&minscale_zoom17;
494+
<Filter>([trail_visibility]='no' or [trail_visibility]='horrible' or [trail_visibility]='bad') and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] is null or [sac_scale] = 'hiking' or [sac_scale] = 'mountain_hiking') and (([highway] = 'path' and [surface] != 'asphalt') or [highway] = 'footway' or [highway] = 'bridleway')</Filter>
495+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.1,2" stroke-opacity="0.5"/>
496+
</Rule>
497+
498+
499+
<!-- invisible path, sac_scale=T3-4, no ferrata -->
500+
501+
<Rule>
502+
&maxscale_zoom15;
503+
&minscale_zoom17;
504+
<Filter>([trail_visibility]='no' or [trail_visibility]='horrible' or [trail_visibility]='bad') and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_mountain_hiking' or [sac_scale] = 'alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
505+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.1,2,1.1,2,1.1,6" stroke-opacity="0.6"/>
506+
</Rule>
507+
508+
<!-- invisible path, sac_scale=T5-6, no ferrata -->
509+
510+
<Rule>
511+
&maxscale_zoom15;
512+
&minscale_zoom17;
513+
<Filter>([trail_visibility]='no' or [trail_visibility]='horrible' or [trail_visibility]='bad') and ([via_ferrata_scale] is null or [via_ferrata_scale] = '0') and ([sac_scale] = 'demanding_alpine_hiking' or [sac_scale] = 'difficult_alpine_hiking') and ([highway] = 'path' or [highway] = 'footway')</Filter>
514+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.1,2,1.1,8" stroke-opacity="0.6"/>
515+
</Rule>
516+
517+
518+
519+
<!-- ferratas are rendered like visible T5-6 -->
520+
521+
<Rule>
522+
&maxscale_zoom15;
523+
&minscale_zoom17;
524+
<Filter>([highway] = 'via_ferrata') or (([via_ferrata_scale] != null and [via_ferrata_scale] != '0') and ([highway] = 'path' or [highway] = 'footway'))</Filter>
525+
<LineSymbolizer stroke="black" stroke-width="1" stroke-dasharray="1.1,2,1.1,8"/>
526+
</Rule>
527+
528+
529+
<!-- end of pathes -->
530+
531+
377532
<Rule>
378533
&maxscale_zoom15;
379534
&minscale_zoom15;

0 commit comments

Comments
 (0)