Changes between Version 19 and Version 20 of Rules/FranceSpecificRules


Ignore:
Timestamp:
2020-03-29T11:09:55+02:00 (6 years ago)
Author:
didier2020
Comment:

add validation rules for French RIU (Referentiel Inter Urbain) at https://www.data.gouv.fr/fr/datasets/bornage-du-reseau-routier-national, explain (https://wiki.openstreetmap.org/wiki/User:Didier2020#Riu)

Legend:

Unmodified
Added
Removed
Modified
  • Rules/FranceSpecificRules

    v19 v20  
    8585    group: tr("missing tag");
    8686}
     87
     88/* #xxxxx add validation rules for French RIU (Referentiel Inter Urbain) at https://www.data.gouv.fr/fr/datasets/bornage-du-reseau-routier-national/*
     89/* # nat_ref is well formed on node (milestone) */
     90node[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")] {
     91    throwWarning: tr("{1} is not a valid reference RIU", "{1.tag}");
     92    -osmoseAssertMatchWithContext: list("node highway=milestone ref='A 4' nat_ref='77PR38DC' operator='SANEF'","inside=FR");
     93}
     94/* # Select major roads */
     95way[highway=~/^(motorway|trunk|primary|secondary|tertiary)$/] {
     96  set major_road;
     97}
     98/* # Select links roads */
     99way[highway=~/^.*_link$/] {
     100  set link_road;
     101}
     102/* # tag nat_ref is for links roads, ref is on major roads */
     103way.major_road[nat_ref][operator][inside("FR")] {
     104    throwWarning: tr("{1} must be a link road", "{1.tag}");
     105    -osmoseAssertMatchWithContext: list("way highway=primary_link nat_ref='62A901609CD_2' operator='SANEF'", "inside=FR");
     106    -osmoseAssertNoMatchWithContext: list("way highway=primary nat_ref='62A901609CD_2' operator='SANEF'", "inside=FR");   
     107}
     108way.major_road[nat_ref:backward][operator][inside("FR")] {
     109    throwWarning: tr("{1} must be a link road", "{1.tag}");
     110    -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref:forward='62A902615CD_1' nat_ref:backward='62A902615CD_2' operator='SANEF'", "inside=FR");
     111    -osmoseAssertNoMatchWithContext: list("way highway=motorway nat_ref:forward='62A902615CD_1' nat_ref:backward='62A902615CD_2' operator='SANEF'", "inside=FR");
     112}
     113way.major_road[nat_ref:forward][operator][inside("FR")] {
     114    throwWarning: tr("{1} must be a link road", "{1.tag}");
     115}
     116/* # tag nat_ref is well formed */
     117way.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")] {
     118    throwWarning: tr("{1} is not a valid reference", "{1.tag}");
     119    -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref='94A900402_1' operator='DIRIF'", "inside=FR");
     120    -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref='80A901645CD_6' operator='SANEF'", "inside=FR");
     121    -osmoseAssertNoMatchWithContext: list("way highway=primary nat_ref='62A901609CD_2' operator='SANEF'", "inside=FR");
     122}
     123/* # tag nat_ref is well formed specific Paris*/
     124way.link_road[nat_ref][operator="VILLE DE PARIS"][nat_ref!~/75Periph_Paris_[0-9]{2}_(1[0-9]|[1-9])/][inside("FR")] {
     125    throwWarning: tr("{1} is not a valid reference (Paris)", "{1.tag}");
     126    -osmoseAssertMatchWithContext: list("way highway=trunk_link nat_ref='75Periph_Paris_05_3' operator='VILLE DE PARIS'", "inside=FR");
     127}
     128
     129way.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] {
     130    throwWarning: tr("{1} is not a valid reference", "{1.tag}");
     131    -osmoseAssertMatchWithContext: list("way highway=motorway_link nat_ref:forward='62A902615CD_1' nat_ref:backward='62A902615CD_2' operator=SANEF", "inside=FR");
     132    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward='62A902615CD_1' one_way='yes' operator='SANEF'", "inside=FR");
     133    -osmoseAssertNoMatchWithContext: list("way highway=motorway nat_ref:forward='62A902615CD_1' one_way='no' operator='SANEF'", "inside=FR");
     134}
     135way.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] {
     136    throwWarning: tr("{1} is not a valid reference", "{1.tag}");
     137}
     138/* # nat_ref reference without operator */
     139way[highway][nat_ref][!operator][inside("FR")] {
     140    throwWarning: tr("Missing tag operator with nat_ref");
     141}
     142way[highway][nat_ref:forward][!operator][inside("FR")] {
     143    throwWarning: tr("Missing tag operator with nat_ref");
     144}
     145way[highway][nat_ref:backward][!operator][inside("FR")] {
     146    throwWarning: tr("Missing tag operator with nat_ref");
     147}
     148
    87149}}}