User:Kannix/Maperitive
Jump to navigation
Jump to search
My first snippets of maperative rules:
CEMT (incl. bridges)
overpass sample query
- overpass API query CEMT=* AND boat=yes AND motorboat=yes/ Nordholland (~9mb):
<osm-script> <union> <union> <query type="way"> <has-kv k="CEMT"/> <bbox-query s="51.90" n="53.50" w="4.00" e="7.25"/> </query> <query type="way"> <has-kv k="boat" v="yes"/> <bbox-query s="51.90" n="53.50" w="4.00" e="7.25"/> </query> <query type="way"> <has-kv k="motorboat" v="yes"/> <bbox-query s="51.90" n="53.50" w="4.00" e="7.25"/> </query> </union> <recurse type="way-node"/> </union> <print mode="meta"/> </osm-script>
waterways-classification-maperative-ruleset
- CEMT:
- bridges:
- Key:seamark:bridge:clearance_height Key:seamark:bridge:clearance_height_closed Key:seamark:bridge:clearance_height_open
- inspired by ANWB Waterkaart Nederland 1:320.000 .jpg Legenda.jpg
- maperative ruleset:
features points bridgeheight : seamark:type=bridge lines waterwayclass : way[CEMT] way[boat] way[motorboat] properties map-sea-color : #000000 map-sea-opacity : 0 map-background-opacity: 0 rules target : waterwayclass define line-opacity : 1 for : CEMT define line-width : 3 else define line-width : 1 for : boat=yes define line-color : black for : motorboat=yes define line-color : green for : CEMT=0 define line-color : #000000 for : CEMT=I define line-color : #8400A8 for : CEMT=II define line-color : #E600A9 for : CEMT=III define line-color : #005CE6 for : CEMT=IV define line-color : #AAFF00 for : CEMT=Va define line-color : #4C7300 for : CEMT=Vb define line-color : #73FFDF for : CEMT=VIa define line-color : #A83800 for : CEMT=VIb define line-color : #9C9C9C for : CEMT=VIc define line-color : #FF5500 for : CEMT=VII define line-color : #8B0000 draw : line target : bridgeheight define icon-width : 8:15;14:20 min-zoom : 8 max-zoom : 14 for : seamark:bridge:clearance_height>=12 AND seamark:bridge:clearance_height<15 define icon-image : icons/SJJB/png/b_rectangle.png for : seamark:bridge:clearance_height>=8.5 AND seamark:bridge:clearance_height<12 define icon-image : icons/SJJB/png/b_circle.png for : seamark:bridge:clearance_height>=3.4 AND seamark:bridge:clearance_height<8.5 define icon-image : icons/SJJB/png/b_star.png for : seamark:bridge:clearance_height>=2.75 AND seamark:bridge:clearance_height<3.4 define icon-image : icons/SJJB/png/b_square.png for : seamark:bridge:clearance_height>=2.4 AND seamark:bridge:clearance_height<2.75 define icon-image : icons/SJJB/png/b_triangle.png for : seamark:bridge:clearance_height<2.4 define icon-image : icons/SJJB/png/b_closed.png icon-width : 8:10;14:15 min-zoom : 5 draw : icon target : bridgeheight define icon-width : 8:15;14:20 min-zoom : 8 max-zoom : 14 for : seamark:bridge:clearance_height_open>12 AND seamark:bridge:clearance_height_open<15 define icon-image : icons/SJJB/png/b_rectangle.png for : seamark:bridge:clearance_height_open>8.5 AND seamark:bridge:clearance_height_open<12 define icon-image : icons/SJJB/png/b_circle.png for : seamark:bridge:clearance_height_open>3.4 AND seamark:bridge:clearance_height_open<8.5 define icon-image : icons/SJJB/png/b_star.png for : seamark:bridge:clearance_height_open>2.75 AND seamark:bridge:clearance_height_open<3.4 define icon-image : icons/SJJB/png/b_square.png for : seamark:bridge:clearance_height_open>2.4 AND seamark:bridge:clearance_height_open<2.75 define icon-image : icons/SJJB/png/b_triangle.png for : seamark:bridge:clearance_height_open<2.4 define icon-image : icons/SJJB/png/b_closed.png icon-width : 8:10;14:15 min-zoom : 5 draw : icon target : bridgeheight for : seamark:type=bridge define icon-image : icons/SJJB/png/b_Clear_V.png min-zoom : 14 icon-width : 25 draw : icon target : bridgeheight define min-zoom : 14 max-zoom : 17 font-weight : bold font-size : 10 text-halo-width : 2 for : seamark:bridge:clearance_height define text : [[seamark:bridge:clearance_height]] for : seamark:bridge:clearance_height_closed AND NOT seamark:bridge:clearance_height_open define text : [[seamark:bridge:clearance_height_closed]]"/-" for : seamark:bridge:clearance_height_closed AND seamark:bridge:clearance_height_open define text : [[seamark:bridge:clearance_height_closed]]"/"[[seamark:bridge:clearance_height_open]] draw : text target : bridgeheight define min-zoom : 17 max-zoom : 19 font-weight : bold font-size : 10 text-halo-width : 2 text-max-width : 20 for : seamark:bridge:clearance_height define text : [[seamark:name]]": "[[seamark:bridge:clearance_height]] for : seamark:bridge:clearance_height_closed AND NOT seamark:bridge:clearance_height_open define text : [[seamark:name]]": "[[seamark:bridge:clearance_height_closed]]"/-" for : seamark:bridge:clearance_height_closed AND seamark:bridge:clearance_height_open define text : [[seamark:name]]": "[[seamark:bridge:clearance_height_closed]]"/"[[seamark:bridge:clearance_height_open]] draw : text
CEVNI notice marks
overpass sample query
- overpass API query seamark:type=notice/ Holland (~160kb):
<osm-script> <query type="node"> <has-kv k="seamark:type" v="notice"/> <bbox-query s="50.90" n="53.80" w="3.00" e="7.36"/> </query> <print mode="meta"/> </osm-script>
waterways-CEVNI-maperative-ruleset
- pretty useless since most icons will overlap ;-) but maybe a starting point ...