Pour info, l'utilisateur offshore44 m'a indiqué la semaine dernière un document où est reportée la feuille de style Maperitive de cette carte : http://www.lavilleavelo.org/carte/annexe.pdf
J'ai fait le copier / coller vers un fichier texte (voir attachement) et remis au propre les indentations (qui avaient sauté dans l'opération), ajouté quelques notes et mis en commentaire ce qui est spécifique à Lyon Pour fonctionner avec Maperitive, l'extension du fichier doit être modifiée en .mrules Merci à l'association pour ce joli travail. Le 6 mars 2012 10:15, Pieren <pier...@gmail.com> a écrit : > 2012/3/6 Yves Rouquier <yves.rouqu...@wanadoo.fr>: > > > notre carte des aménagements cyclables http://carte.lavilleavelo.org/. > > C'est une des cartes les plus claires que j'ai vu jusqu'à maintenant > pour ce type de rendu. > > > Pieren > > _______________________________________________ > Talk-fr mailing list > Talk-fr@openstreetmap.org > http://lists.openstreetmap.org/listinfo/talk-fr > -- ab_fab <http://wiki.openstreetmap.org/wiki/User:Ab_fab> "Il n'y a pas de pas perdus"
// Maperitive rendering ruleset resembling Google Maps (as of February 2011) // http://maperitive.net // Created by Igor Brejc // Released under the Creative Commons Attribution-ShareAlike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/) // code modifié par la Ville à Vélo pour la carte des aménagements cyclables de Lyon. //================================= Correspondances avec balises OSM ============================== features //================================================================================================= //================= Points d'intérêt points place city : place=city place town : place=town place village : place=village place hamlet : place=hamlet place suburb : place=suburb pkv : amenity=bicycle_parking //## velov : amenity=bicycle_rental velociste : shop=bicycle church : amenity=place_of_worship AND religion=christian drinking water : amenity=drinking_water toilets : amenity=toilets //## psr : amenity=community_centre AND name="Pignon sur Rue" metro : railway=station //================= Tracés lines contour major : contour[@isMulti(elevation, 50)] contour minor : contour[@isMulti(elevation, 10) and not @isMulti(elevation, 50)] ///----------------- Rue piétonne pietonne : highway=pedestrian ///----------------- Sens unique non-DSC su : (oneway=yes OR oneway=true) AND NOT (cycleway=opposite or cycleway=opposite_lane or highway=cycleway or cycleway=opposite_track) ///----------------- Bande Cyclable Sens unique bcsu : (cycleway=lane OR cycleway:right=lane) AND (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Bande Cyclable double sens côté droit bcdscd : (cycleway:right=lane) AND NOT (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Bande Cyclable double sens côté gauche bcdscg : (cycleway:left=lane) AND NOT (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Bande Cyclable double sens bcds : (cycleway=lane) AND NOT (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Piste Cyclable pc : highway=cycleway AND NOT (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Piste Cyclable Sens unique pcsu : highway=cycleway AND (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Bus + Vélo droite bvd : cycleway:right=share_busway ///----------------- Bus + Vélo gauche bvg : cycleway:left=share_busway ///----------------- Bus + Vélo gauche et droit bvgd : cycleway=share_busway AND NOT (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Bus + Vélo droite sens unique (par défaut) bvdsu : cycleway=share_busway AND oneway=yes ///----------------- DSC dsc : (cycleway=opposite OR cycleway=opposite_lane OR cycleway=opposite_track ) AND (oneway=yes OR oneway=true OR oneway=-1) ///----------------- Métro C / funiculaires //## metroc : railway=subway AND name="Ligne C" //## funic : description=funiculaire ///----------------- Limites administratives boundary country : boundary=administrative AND (admin_level=2 OR admin_level=4) AND NOT natural=coastline ///----------------- Voies ferrées railway : railway=rail AND @isFalse(disused) AND NOT service=yard AND @isFalse(noexit) ///----------------- Voirie motorway : highway=motorway //## AND NOT bridge_name="Pont de la Mulatière" //## mulatiere : highway=motorway AND bridge_name="Pont de la Mulatière" motorway link : highway=motorway_link //## AND NOT bridge_name="Pont de la Mulatière" //## mulatiere link : highway=motorway_link AND bridge_name="Pont de la Mulatière" trunk : @isOneOf(highway, trunk, trunk_link) highway major : @isOneOf(highway, primary, primary_link) highway moyen : @isOneOf(highway, secondary, secondary_link) highway minor : @isOneOf(highway, unclassified, residential, service, tertiary, tertiary_link) OR (highway=track AND (@isOneOf(tracktype, grade1, grade2, grade3) OR NOT tracktype)) path : @isOneOf(highway, path, footway) OR (highway=track AND @isOneOf(tracktype, grade4, grade5)) voieverte : highway=path and motor_vehicle=no and not bicycle=no //## dombes : highway=path and name="Voie de la Dombes" ///----------------- Cours d'eau filaire water line : waterway=stream ///----------------- Accès interdit aux vélos velonon : bicycle=no areas water : natural=water OR natural=wetland OR waterway=riverbank OR waterway=stream OR landuse=reservoir OR landuse=basin aeroway area : aeroway industrial : landuse=industrial residential area : landuse=residential hospital : amenity=hospital park : leisure=park forest : landuse=forest OR natural=wood cemetery : landuse=cemetery building : building=yes OR building=hall OR building=church place : leisure=common OR leisure=garden OR leisure=park mairie : amenity=townhall //================================= Propriétés générales de la carte ============================== properties //================================================================================================= map-background-color : #F4F1EA white 15% map-background-opacity : 1 map-sea-color : #99B3CC font-family : Perspective Sans text-max-width : 25 text-align-horizontal : center text-align-vertical : center font-stretch : 1.5 map.rendering.lflp.min-buffer-space : 5 map.rendering.lflp.max-allowed-corner-angle : 40 //================================= Règles de rendu =============================================== rules //================================================================================================= ///------------------------------------------------------------------------------------------------ ///------------------------------- pkv, Velov, velociste ------------------------------------------ ///------------------------------------------------------------------------------------------------ target: contour* define line-color : #7f3300 line-opacity : 0.15 curved : true if : *major define min-zoom : 9 line-width : 11:0.1;11.9:1;12:2 else define min-zoom : 12 line-width : 1 draw : contour ///---------------------------------------- Parking à vélos --------------------------------------- target: pkv define icon-image : http://img11.hostingpics.net/pics/683712parking.png min-zoom : 15 icon-width : 14:2;18:17 draw : icon define text : capacity text-offset-horizontal : 6 text-offset-vertical : 5 min-zoom : 16 font-size : 15:11 text-halo-width : 3 font-stretch : 0.90 draw : text ///---------------------------------------- Velov ------------------------------------------------- target: velov define min-zoom : 16 shape : custom shape-def : -10,0,-40,80,-25,80,0,15,25,80,40,80,10,0;Z shape-size : 16 shape-aspect : 1 fill-color : red line-style : none draw : shape ///---------------------------------------- Velociste --------------------------------------------- target: velociste define icon-image : velociste.png min-zoom : 13 icon-width : 12:6;15:25;18:40 draw : icon define text : name text-offset-horizontal : 0 text-offset-vertical : -22 min-zoom : 15 font-size : 16:10;18:14 text-halo-width : 5 font-stretch : 0.95 draw : text ///---------------------------------------- Association Pignon sur Rue ---------------------------- //##target: psr //## define //## icon-image : psr.png //## min-zoom : 13 //## icon-width : 12:8;15:30;18:30 //## shape-mode : center //## draw : icon //## //## define //## text : name //## text-offset-horizontal : 0 //## text-offset-vertical : 18 //## min-zoom : 15 //## font-size : 13 //## text-halo-width : 0 //## font-stretch : 0.95 //## draw : text ///---------------------------------------- Hôtel de Ville --------------------------------------- target: mairie define icon-image : mairie.png min-zoom : 15 icon-width : 12:5;15:5;18:20 shape-mode : center draw : icon define text : name text-offset-horizontal : 0 text-offset-vertical : 15 min-zoom : 15 font-size : 12:5;17:12 text-halo-width : 6 font-stretch : 0.95 draw : text ///---------------------------------------- Station de métro / Train ----------------------------- target : metro define icon-image : metro.png min-zoom : 14 icon-width : 12:5;15:10;18:20 shape-mode : center draw : icon define text : name text-offset-horizontal : 0 text-offset-vertical : 10 min-zoom : 14 font-size : 14:10;18:12 text-halo-width : 3 font-stretch : 0.95 draw : text ///------------------------------------------------------------------------------------------------ ///---------------------------------------- Polygones -------------------------------------------- ///------------------------------------------------------------------------------------------------ target : $featuretype(area) define line-style : none line-width : 1 ///---------------------------------------- Etendue d'eau ---------------------------------------- if : water define fill-color : #7cb1d5 elseif : place define line-style : solid line-width : 1 min-zoom : 12 fill-color : #ccffbb ///---------------------------------------- Bâtiment --------------------------------------------- elseif : building define line-style : solid line-width : 1.5 line-color : #F4F1EA min-zoom : 11 fill-color : #DDDAD5 white 20% ///---------------------------------------- Hôpital ---------------------------------------------- elseif : hospital define fill-color : #e5c6c3 ///---------------------------------------- Parc ------------------------------------------------- elseif : park define fill-color : #b5d29c ///---------------------------------------- Cimetière -------------------------------------------- elseif : cemetery define fill-color : #d1d0cd ///---------------------------------------- Forêts ----------------------------------------------- elseif : forest define min-zoom : 9 fill-color : #CBD8C3 else stop draw : fill ///------------------------------------------------------------------------------------------------ ///---------------------------------------- Textes descriptifs ------------------------------------ ///------------------------------------------------------------------------------------------------ define font-weight : normal ///---------------------------------------- Etendue d'eau ---------------------------------------- if : water define min-zoom : 15 font-size : 12:10;20:20 font-stretch : 0.95 ///---------------------------------------- Hôpital ---------------------------------------------- elseif : hospital define min-zoom : 15 font-size : 12:10;20:20 text-color : #e5c6c3 black 50% font-stretch : 0.95 ///---------------------------------------- Cimetière -------------------------------------------- elseif : cemetery define min-zoom : 16 max-zoom : 18 font-size : 12:10;20:12 text-color : #d1d0cd black 50% font-stretch : 0.95 ///---------------------------------------- Parc ------------------------------------------------- elseif : park define min-zoom : 15 max-zoom : 19 font-size : 12:4;20:10 text-color : #000000 text-halo-width : 0 text-max-width : 10 font-stretch : 0.95 ///---------------------------------------- Place ------------------------------------------------- elseif : place define min-zoom : 15 font-size : 12:7;20:11 text-color : #b5d29c black 80% font-weight : bold text-halo-width : 0 text-max-width : 9 font-stretch : 0.95 else stop draw : text ///---------------------------------------- Toponymie --------------------------------------------- target : $featuretype(point) define text-halo-width : 25% if : place* define //font-weight : bold if : *city define font-size : 11:15;14:15 min-zoom : 6 max-zoom : 16 font-stretch : 0.95 elseif : *town define font-size : 11:15;20:15 min-zoom : 8 max-zoom : 16 font-stretch : 0.95 elseif : *suburb define font-size : 13:10;20:20 min-zoom : 11 text-color : white black 50% font-stretch : 0.95 elseif : *village define font-size : 12:10;20:20 min-zoom : 11 font-stretch : 0.95 elseif : *hamlet define font-size : 14:8;20:16 min-zoom : 14 font-stretch : 0.95 draw : text ///---------------------------------------- Voies ferrées ----------------------------------------- target : railway define min-zoom : 13 line-color : #a1a1a1 line-width : 2 draw : line define min-zoom : 13 line-style : dashlong line-color : white line-width : 1 border-style : solid border-color : #a1a1a1 border-width : 25% draw : line define min-zoom : 6 max-zoom : 13 line-style : solid border-style : none line-color : #a1a1a1 line-width : 1 draw : line ///---------------------------------------- Autoroutes -------------------------------------------- target : motorway define line-width : 7:1;13:3;15:4 min-zoom : 7 line-color : #ffe068 border-style : solid border-color : #FFC345 black 20% border-width : 50% draw : line define min-zoom : 7 text : ref text-halo-width : 0 text-color : white font-size : 9 font-weight : bold shape : custom shape-def : m:-10,-10;l:0,-14,10,-10,10,10,0,14,-10,10;z shield-resize-mode : free shield-padding-left : 6 shield-padding-right : 6 shield-padding-top : 2 shield-padding-bottom : 1 fill-color : #7488dd line-color : #7488dd black 20% line-width : 1 draw : shield define line-color : #FF0000 white 30% line-width : 13:1;14:1;15:2 line-style : dot draw : line //===================================================================================================== //##target : mulatiere //## define //## line-width : 7:1;13:3;15:4 //## min-zoom : 7 //## line-color : #ffe068 //## border-style : solid //## border-color : #FFC345 black 20% //## border-width : 50% //## draw : line //## //## define //## min-zoom : 7 //## text : ref //## text-halo-width : 0 //## text-color : white //## font-size : 9 //## font-weight : bold //## shape : custom //## shape-def : m:-10,-10;l:0,-14,10,-10,10,10,0,14,-10,10;z //## shield-resize-mode : free //## shield-padding-left : 6 //## shield-padding-right : 6 //## shield-padding-top : 2 //## shield-padding-bottom : 1 //## fill-color : #7488dd //## line-color : #7488dd black 20% //## line-width : 1 //## draw : shield //## //## target : mulatiere link //## define //## line-width : 7:1;13:2;15:3 //## min-zoom : 10 //## line-color : #ffe068 //## border-style : solid //## border-color : #ffe068 black 20% //## border-width : 50% //## draw : line ///---------------------------------------- Echangeurs d'autoroutes -------------------------------------------- target : motorway link define line-width : 7:1;13:2;15:3 min-zoom : 10 line-color : #ffe068 border-style : solid border-color : #ffe068 black 20% border-width : 50% draw : line define line-color : #FF0000 white 30% line-width : 13:1;14:1;15:2 line-style : dot draw : line target : highway* define font-size : 15:7;18:10 font-weight : bold ///---------------------------------------- Bande Cyclable -------------------------------------------------------- //----------------- Bande Cyclable Sens unique target : bcsu define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-100,-55,-100,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : #32CD32 line-style : none draw : shape //----------------- Bande Cyclable double sens côté droit target : bcdscd define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-100,-55,-100,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : #32CD32 line-style : none draw : shape //----------------- Bande Cyclable double sens côté gauche target : bcdscg define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-100,-55,-100,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : #32CD32 line-style : none angle : 180 draw : shape //----------------- Bande Cyclable double sens target : bcds define min-zoom : 12 shape : custom shape-def : -30,30,-30,60,30,60,30,30;z;m:-30,-30;30,-30,30,-60,-30,-60;z shape-size : 12:6;18:22 shape-aspect : 1 shape-spacing : 0.1 fill-color : #32CD32 line-style : none angle : 180 draw : shape ///---------------------------------------- Piste Cyclable bi-directionnelle et uni-d. ------------ ///----------------- Piste Cyclable target : pc define min-zoom : 12 line-color : #32CD32 line-width : 12:3;18:7 line-style : solid draw : line define min-zoom : 12 max-zoom : 20 font-size : 13:10 font-stretch : 0.85 text-halo-width : 1 draw : text ///----------------- Piste Cyclable Sens unique target : pcsu define min-zoom : 12 line-color : #32CD32 line-width : 13:3;18:7 line-style : solid draw : line define min-zoom : 12 shape : custom shape-def : 80,0,-30,-70,-30,70;Z shape-size : 12:5;18:14 shape-aspect : 1 shape-spacing : 2 fill-color : #FFFFFF line-style : solid line-color : #000000 white 50% line-width : 1 for : oneway=-1 define angle : 180 draw : shape ///---------------------------------------- Bus + vélo Droite et Gauche --------------------------- ///----------------- Bus + Vélo droite target : bvd define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-100,-55,-100,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : blue white 25% line-style : none draw : shape ///----------------- Bus + Vélo droite sens unique (par défaut) target : bvdsu define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-100,-55,-100,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : blue white 25% line-style : none draw : shape ///----------------- Bus + Vélo gauche target : bvg define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-100,-55,-100,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : blue white 25% line-style : none angle : 180 draw : shape ///----------------- Bus + Vélo gauche et droit target : bvgd define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-150,-55,-150,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : blue white 25% line-style : none draw : shape define min-zoom : 12 shape : custom shape-def : 110,-40,20,-80,20,-55,-150,-55,-150,-25,20,-25,20,0;Z shape-size : 12:6;18:22 shape-aspect : 2 shape-spacing : 0.2 fill-color : blue white 25% line-style : none angle : 180 draw : shape ///----------------- DSC target : dsc define min-zoom : 15 shape : custom shape-def : -230,0,-80,-70,-80,-15,-70,-15,-70,15,-80,15,-80,70;Z shape-size : 11:3;18:30 shape-aspect : 1 shape-spacing : 2 fill-color : #00dd00 line-style : none for : oneway=-1 define angle : 180 draw : shape draw : shape define min-zoom : 15 shape : custom shape-def : 230,0,80,-70,80,-15,-70,-15,-70,15,80,15,80,70;Z shape-size : 11:3;18:30 shape-aspect : 1 shape-spacing : 2 fill-color : #000000 white 20% line-style : none for : oneway=-1 define angle : 180 draw : shape ///----------------- SU non-DSC target : su define min-zoom : 15 shape : custom shape-def : 150,0,0,-70,0,-15,-150,-15,-150,15,0,15,0,70;Z shape-size : 11:0;18:17 shape-aspect : 1 shape-spacing : 4 fill-color : #000000 white 20% line-style : none for : oneway=-1 define angle : 180 draw : shape ///---------------------------------------- Velo interdit ----------------------------------------- target : velonon define line-color : #FF0000 white 30% line-width : 13:1;14:1;15:2 line-style : dot draw : line ///---------------------------------------- Voies Rapides ----------------------------------------- target : trunk define min-zoom : 8 line-color : #FBE297 white 40% line-width : 10:1;13:2;14:3;15:4;18:11 border-style : solid border-color : #D19828 white 30% border-width : 1 draw : line define min-zoom : 13 max-zoom : 20 font-size : 13:11;17:12 text-offset-vertical : 13:-12;18:-11 font-stretch : 1 font-weight : bold text-halo-width : 4 draw : text define line-color : #FF0000 white 30% line-width : 13:1;14:1;15:2 line-style : dot draw : line ///---------------------------------------- Routes principales ------------------------------------ target : highway major define min-zoom : 8 line-color : #FBE297 white 40% line-width : 10:1;13:2;14:3;15:4;18:11 border-style : solid border-color : #D19828 white 30% border-width : 1 draw : line define min-zoom : 13 max-zoom : 20 font-size : 13:11;17:12 text-offset-vertical : 13:-12;18:-11 font-stretch : 1 font-weight : bold text-halo-width : 4 draw : text ///---------------------------------------- Routes moyennes --------------------------------------- target : highway moyen define min-zoom : 12 max-zoom : 20 line-color : white line-width : 13:1.5;15:3;18:09 border-style : solid border-color : #D4CCB8 border-width : 0.5 border-color : #000000 white 50% draw : line define min-zoom : 13 max-zoom : 20 font-size : 13:10;18:17 text-offset-vertical : 13:-5;18:-11 font-stretch : 1 text-halo-width : 1 draw : text ///---------------------------------------- Routes mineures --------------------------------------- target : highway minor define min-zoom : 12 max-zoom : 20 line-color : white line-width : 13:1.5;15:3;18:09 border-style : solid border-color : #D4CCB8 border-width : 0.5 border-color : #000000 white 50% draw : line define min-zoom : 15.8 max-zoom : 20 font-size : 13:6;18:12 font-stretch : 0.95 text-offset-vertical : 13:-5;18:-11 text-halo-width : 0 draw : text ///---------------------------------------- Metro ligne C ----------------------------------------- //## target : metroc //## define //## min-zoom : 13.1 //## max-zoom : 20 //## line-color : #FCB23E //## line-width : 13:1.5;15:2;18:8 //## border-style : solid //## border-width : 0.7 //## border-color : #000000 //## line-style : dash //## draw : line //## //## define //## min-zoom : 12 //## max-zoom : 20 //## font-size : 13:6;18:20 //## font-stretch : 1 //## text-offset-vertical : 13:-5;18:-11 //## text-halo-width : 5 //## draw : text ///---------------------------------------- Funiculaire ------------------------------------------- //## target : funic //## define //## min-zoom : 13.1 //## max-zoom : 20 //## line-color : #63b94f //## line-width : 13:1.5;15:2;18:18 //## border-style : solid //## border-width : 0.7 //## border-color : #000000 //## line-style : dash //## draw : line //## //## define //## min-zoom : 12 //## max-zoom : 20 //## font-size : 13:6;18:20 //## font-stretch : 1 //## text-offset-vertical : 13:-5;18:-11 //## text-halo-width : 5 //## draw : text ///---------------------------------------- Rues Piétonnes ---------------------------------------- target : pietonne define min-zoom : 15 border-style : none line-color : #FFC119 line-width : 1 draw : line define min-zoom : 15 line-color : #FFFFFF line-width : 13:1.5;14:2;15:3;16:4 border-style : solid border-color : #0011FF white 60% border-width : 2 line-offset-sides : left draw : line define min-zoom : 15 font-size : 13:10 font-stretch : 0.85 text-halo-width : 0 draw : text ///---------------------------------------- Voie verte -------------------------------------------- target : voieverte define min-zoom : 12 line-color : #32CD32 line-width : 12:3;18:7 draw : line define min-zoom : 15 max-zoom : 20 font-size : 13:10 font-stretch : 0.85 text-halo-width : 0 draw : text ///---------------------------------------- Dombes ------------------------------------------------ //## target : dombes //## define //## min-zoom : 12 //## line-color : #32CD32 //## line-width : 12:3;18:7 //## draw : line //## //## define //## min-zoom : 15 //## max-zoom : 20 //## font-size : 13:10 //## font-stretch : 0.85 //## text-halo-width : 0 //## draw : text ///---------------------------------------- Chemins ----------------------------------------------- target : path define min-zoom : 14 max-zoom : 20 line-color : #bfab97 line-width : 13:1;14:1;15:3 line-style : dash draw : line define min-zoom : 15 font-size : 15:10;18:12 font-stretch : 0.85 text-halo-width : 0 text-offset-vertical : 13:-5;18:-11 draw : text ///---------------------------------------- Cours d'eau filaires ---------------------------------- target : water line define min-zoom : 10 line-color : #99B3CC line-width : 14:1;16:5;20:10 draw : line
_______________________________________________ Talk-fr mailing list Talk-fr@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-fr