Version 25 (modified by 5 years ago) ( diff ) | ,
---|
France specific rules
meta { title: "France specific rules"; version: "1.106_2025-06-21"; description: "Rules, which are limited to France only."; author: "PanierAvide"; icon: "Flag_of_France.svg"; link: "https://josm.openstreetmap.de/wiki/Rules/FranceSpecificRules"; min-josm-version: "14481"; /* due to osmose attributs */ baselanguage: "en"; } meta[lang=fr] { title: "Règles pour la France"; description: "Règles de validation spécifiques à la France"; } way[railway=rail][!gauge][inside("FR")] { throwWarning: tr("Missing tag gauge on rail"); suggestAlternative: "gauge"; -osmoseItemClassLevel: "2160/21600/3"; -osmoseTags: list("tag", "railway"); -osmoseAssertMatchWithContext: list("way railway=rail", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way railway=rail gauge=1435", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way railway=disused", "inside=FR"); } *[name=~/(?i)co.?voiturage/][amenity!=car_pooling][!carpool][inside("FR")] { throwWarning: tr("Missing tag carpool on area"); -osmoseItemClassLevel: "2080/20806/3"; -osmoseTags: list("parking", "amenity", "fix:chair"); fixAdd: "carpool=designated"; fixAdd: "amenity=car_pooling"; -osmoseAssertMatchWithContext: list("node name='Aire de Covoiturage' amenity=parking", "inside=FR"); -osmoseAssertMatchWithContext: list("way name='Aire de covoiturage' amenity=car_sharing", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way name='Aire de covoiturage' amenity=car_pooling", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way name='Aire de covoiturage' amenity=parking carpool=designated", "inside=FR"); } *[amenity=fuel][fuel:octane_95=yes][!fuel:e10][inside("FR")] { throwWarning: tr("Does this station still sell SP95, or has it been replaced by the SP95-E10?"); -osmoseItemClassLevel: "4061/40612/2"; -osmoseTags: list("parking", "amenity", "fix:chair"); suggestAlternative: "fuel:e10=yes/no"; } /* #12914 - Discourage contributors to use operator=ERDF in France. */ *[operator=ERDF][inside("FR")] { throwWarning: tr("{0} is deprecated", "{0.tag}"); suggestAlternative: "operator=Enedis"; group: tr("deprecated tagging"); fixAdd: "operator=Enedis"; } /* #18640 - Discourage contributors to use ref:ERDF:gdo in France. */ *[ref:ERDF:gdo][inside("FR")] { throwWarning: tr("{0} is deprecated", "{0.tag}"); suggestAlternative: "ref:FR:gdo"; group: tr("deprecated tagging"); fixChangeKey: "ref:ERDF:gdo=>ref:FR:gdo"; } /* #18640 - ref:FR:gdo validation */ *[ref:FR:gdo][ref:FR:gdo!~/[0-9AB]{5}[A-Z]{1,3}[0-9]{4,}/][inside("FR")] { throwWarning: tr("{0} is invalid", "{0.tag}"); } *[power=substation][!ref:FR:gdo][ref][operator=~/^(Enedis|GRDF)$/][inside("FR")], *[power=switch][!ref:FR:gdo][ref][operator=Enedis][inside("FR")] { throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}"); group: tr("missing tag"); } /* #18552 - Add validation rules for French telecom references */ *[ref:FR:ARCEP ][telecom!=connection_point], *[ref:FR:ARCEP ][telecom:medium!=fibre], *[ref:FR:Orange ][telecom:medium!=fibre], *[ref:FR:SFR ][telecom:medium!=fibre], *[ref:FR:PTT ][telecom:medium!=copper] { throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}"); group: tr("missing tag"); } /* #xxxxx add validation rules for French RIU (Referentiel Inter Urbain) at https://www.data.gouv.fr/fr/datasets/bornage-du-reseau-routier-national/* /* # nat_ref is well formed on node (milestone) */ node[highway=milestone][nat_ref][nat_ref!~/([1-9][0-9]|0[1-9])PR([0-9]|[1-9][0-9]|[1-9][0-9][0-9])[DGU](|C)$/][inside("FR")] { throwWarning: tr("{0} is not a node valid reference RIU", "{1.tag}"); group: tr("validation rules nat_ref in France"); -osmoseAssertMatchWithContext: list("node highway=milestone distance=38 ref=\"A 4\" nat_ref=77PR38DC operator=SANEF", "inside=FR"); -osmoseAssertNoMatchWithContext: list("node highway=milestone distance=38", "inside=FR"); } /* # Select major roads */ way[highway=~/^(motorway|trunk|primary|secondary|tertiary)$/] { set major_road; } /* # Select links roads */ way[highway=~/^.*_link$/] { set link_road; } /* # tag nat_ref is for links roads, ref is on major roads */ way.major_road[nat_ref][operator][inside("FR")] { throwWarning: tr("{0} must be a link road", "{1.tag}"); group: tr("validation rules nat_ref in France"); -osmoseAssertMatchWithContext: list("way highway=primary_link nat_ref='62A901609CD_2' operator='SANEF'", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way highway=primary nat_ref='62A901609CD_2' operator='SANEF'", "inside=FR"); } way.major_road[nat_ref:backward][operator][inside("FR")] { throwWarning: tr("{0} must be a link road ", "{1.tag}"); group: tr("validation rules nat_ref in France"); -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref:forward='62A902615CD_1' nat_ref:backward='62A902615CD_2' operator='SANEF'", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way highway=motorway nat_ref:forward='62A902615CD_1' nat_ref:backward='62A902615CD_2' operator='SANEF'", "inside=FR"); } way.major_road[nat_ref:forward][operator][inside("FR")] { throwWarning: tr("{0} must be a link road", "{1.tag}"); group: tr("validation rules nat_ref in France"); } /* # tag nat_ref is well formed */ way.link_road[nat_ref][operator!="VILLE DE PARIS"][nat_ref!~/([1-9][0-9]|0[1-9])[ANP]9[0-9]{3}[0-9]{2}[a-z]*(|CD)_(1[0-9]|[1-9])$/][inside("FR")] { throwWarning: tr("{0} is not a valid reference", "{1.tag}"); group: tr("validation rules nat_ref in France"); -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref='94A900402_1' operator='DIRIF'", "inside=FR"); -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref='80A901645CD_6' operator='SANEF'", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way highway=primary nat_ref='62A901609CD_2' operator='SANEF'", "inside=FR"); } /* # tag nat_ref is well formed specific Paris*/ way.link_road[nat_ref][operator="VILLE DE PARIS"][nat_ref!~/75Periph_Paris_[0-9]{2}_(1[0-9]|[1-9])$/][inside("FR")] { throwWarning: tr("{0} is not a valid reference (Paris)", "{1.tag}"); group: tr("validation rules nat_ref in France"); -osmoseAssertMatchWithContext: list("way highway=trunk_link nat_ref='75Periph_Paris_05_3' operator='VILLE DE PARIS'", "inside=FR"); } way.link_road[nat_ref:forward][nat_ref:forward!~/([1-9][0-9]|0[1-9])[ANP]9[0-9]{3}[0-9]{2}[a-z]*(|CD)_(1[0-9]|[1-9])$/][inside("FR")][one_way!=yes] { throwWarning: tr("{0} is not a valid reference", "{1.tag}"); group: tr("validation rules nat_ref in France"); -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref:forward='62A902615CD_1' nat_ref:backward='62A902615CD_2' operator=SANEF", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward='62A902615CD_1' one_way='yes' operator='SANEF'", "inside=FR"); -osmoseAssertNoMatchWithContext: list("way highway=motorway nat_ref:forward='62A902615CD_1' one_way='no' operator='SANEF'", "inside=FR"); } way.link_road[nat_ref:backward][nat_ref:backward!~/([1-9][0-9]|0[1-9])[ANP]9[0-9]{3}[0-9]{2}[a-z]*(|CD)_(1[0-9]|[1-9])$/][inside("FR")][one_way!=yes] { throwWarning: tr("{0} is not a valid reference", "{1.tag}"); group: tr("validation rules nat_ref in France"); } /* # nat_ref reference without operator */ way[highway][nat_ref][!operator][inside("FR")] { throwWarning: tr("Missing tag operator with nat_ref"); group: tr("validation rules nat_ref in France"); } way[highway][nat_ref:forward][!operator][inside("FR")] { throwWarning: tr("Missing tag operator with nat_ref"); group: tr("validation rules nat_ref in France"); } way[highway][nat_ref:backward][!operator][inside("FR")] { throwWarning: tr("Missing tag operator with nat_ref"); group: tr("validation rules nat_ref in France"); }
Rules_FranceSpecificRules.validator.mapcss, Rules_FranceSpecificRules.zip
Attachments (1)
- Flag_of_France.svg (249 bytes ) - added by 6 years ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.