Changes between Version 93 and Version 94 of Rules/FranceSpecificRules


Ignore:
Timestamp:
2024-08-06T16:45:10+02:00 (18 months ago)
Author:
didier2020
Comment:

validation nat_ref in metropole

Legend:

Unmodified
Added
Removed
Modified
  • Rules/FranceSpecificRules

    v93 v94  
    126126
    127127/* validation rules for French RIU (Referentiel Inter Urbain) at https://www.data.gouv.fr/fr/datasets/bornage-du-reseau-routier-national   */
    128 node[highway=milestone][operator][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")] {
     128node[highway=milestone][operator][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("FX")] {
    129129    throwWarning: tr("{0} is not a milestone valid reference RIU", "{2.tag}");
    130130    group: tr("validation rules highway milestone");
    131131    -osmoseItemClassLevel: "3040/30403/3";
    132132    -osmoseTags: list("ref", "highway");
    133     -osmoseAssertNoMatchWithContext: list("node highway=milestone distance=38 nat_ref=77PR38DC operator=SANEF", "inside=FR");
     133    -osmoseAssertNoMatchWithContext: list("node highway=milestone distance=38 nat_ref=77PR38DC operator=SANEF", "inside=FX");
    134134}
    135135
    136136/* missing distance for milestone */
    137 node[highway=milestone][operator][nat_ref][!distance][inside("FR")] {
     137node[highway=milestone][operator][nat_ref][!distance][inside("FX")] {
    138138    throwWarning: tr("missing distance");
    139139    group: tr("validation rules highway milestone");
    140140    -osmoseItemClassLevel: "9019/9019001/3";
    141141    -osmoseTags: list("ref", "highway");
    142     -osmoseAssertMatchWithContext: list("node highway=milestone nat_ref=77PR38DC operator=SANEF", "inside=FR");
    143     -osmoseAssertNoMatchWithContext: list("node highway=milestone distance=38 nat_ref=77PR38DC operator=SANEF", "inside=FR");
     142    -osmoseAssertMatchWithContext: list("node highway=milestone nat_ref=77PR38DC operator=SANEF", "inside=FX");
     143    -osmoseAssertNoMatchWithContext: list("node highway=milestone distance=38 nat_ref=77PR38DC operator=SANEF", "inside=FX");
    144144}
    145145
    146146/* tag nat_ref is for links roads, ref is on major roads */
    147 way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified)$/][nat_ref][operator][!junction][inside("FR")],
    148 way[highway=service][nat_ref][nat_ref!~/^([1-9][0-9]|0[1-9])[AN]8[0-9]{3}(|A|N)([0-9]?[0-9])(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D$/][operator][!junction][inside("FR")]
     147way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified)$/][nat_ref][operator][!junction][inside("FX")],
     148way[highway=service][nat_ref][nat_ref!~/^([1-9][0-9]|0[1-9])[AN]8[0-9]{3}(|A|N)([0-9]?[0-9])(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D$/][operator][!junction][inside("FX")]
    149149{
    150150    throwWarning: tr("{0} must be a link road or roundabout", "{1.tag}");
     
    152152    -osmoseItemClassLevel: "9019/9019002/3";
    153153    -osmoseTags: list("ref", "highway");
    154     -osmoseAssertMatchWithContext: list("way highway=primary nat_ref=62A901609CD_2D operator=SANEF", "inside=FR");
    155     -osmoseAssertNoMatchWithContext: list("way highway=service nat_ref=50A802209_1D operator=DIRO", "inside=FR");
    156     -osmoseAssertNoMatchWithContext: list("way highway=primary junction=roundabout nat_ref=62A901609CD_2D operator=SANEF", "inside=FR");
    157     -osmoseAssertNoMatchWithContext: list("way highway=service junction=roundabout nat_ref=62A801609CD_12D operator=SANEF", "inside=FR");
    158 }
    159 
    160 way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|service)$/]["nat_ref:backward"][operator][inside("FR")],
    161 way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|service)$/]["nat_ref:forward"][operator][inside("FR")] {
     154    -osmoseAssertMatchWithContext: list("way highway=primary nat_ref=62A901609CD_2D operator=SANEF", "inside=FX");
     155    -osmoseAssertNoMatchWithContext: list("way highway=service nat_ref=50A802209_1D operator=DIRO", "inside=FX");
     156    -osmoseAssertNoMatchWithContext: list("way highway=primary junction=roundabout nat_ref=62A901609CD_2D operator=SANEF", "inside=FX");
     157    -osmoseAssertNoMatchWithContext: list("way highway=service junction=roundabout nat_ref=62A801609CD_12D operator=SANEF", "inside=FX");
     158}
     159
     160way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|service)$/]["nat_ref:backward"][operator][inside("FX")],
     161way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|service)$/]["nat_ref:forward"][operator][inside("FX")] {
    162162    throwWarning: tr("{0} must be a link road ", "{1.tag}");
    163163    group: tr("validation rules nat_ref in France");
    164164    -osmoseItemClassLevel: "9019/9019002/3";
    165165    -osmoseTags: list("ref", "highway");
    166     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_11D nat_ref:backward=62A902615CD_2D operator='SANEF'", "inside=FR");
     166    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_11D nat_ref:backward=62A902615CD_2D operator='SANEF'", "inside=FX");
    167167}
    168168
    169169/* tag nat_ref is well formed (isidor format) , (bretelles code 9 ou aire de service code 8)*/
    170 way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/][nat_ref][nat_ref!~/^([1-9][0-9]|0[1-9])[ANP](8|9)[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D$/][operator!="VILLE DE PARIS"][inside("FR")]{
     170way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/][nat_ref][nat_ref!~/^([1-9][0-9]|0[1-9])[ANP](8|9)[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D$/][operator!="VILLE DE PARIS"][inside("FX")]{
    171171    throwWarning: tr("{0} is not a valid reference", "{1.tag}");
    172172    group: tr("validation rules nat_ref in France");
    173173    -osmoseItemClassLevel: "9019/9019002/3";
    174174    -osmoseTags: list("ref", "highway");
    175     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=80A901645CD_16D operator=SANEF", "inside=FR");
    176     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=80A801645CD_16D operator=SANEF", "inside=FR");
    177     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=78A901319CD_1D operator=SAPN", "inside=FR");
    178     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=78A801319CD_1D operator=SAPN", "inside=FR");
     175    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=80A901645CD_16D operator=SANEF", "inside=FX");
     176    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=80A801645CD_16D operator=SANEF", "inside=FX");
     177    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=78A901319CD_1D operator=SAPN", "inside=FX");
     178    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref=78A801319CD_1D operator=SAPN", "inside=FX");
    179179}
    180180
    181181/* tag nat_ref is well formed on roundabout (isidor format) */
    182 way[junction=roundabout][highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|service)$/][nat_ref][nat_ref!~/^(([1-9][0-9]|0[1-9])[ANP](8|9)[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D)$/][inside("FR")] {
     182way[junction=roundabout][highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|service)$/][nat_ref][nat_ref!~/^(([1-9][0-9]|0[1-9])[ANP](8|9)[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D)$/][inside("FX")] {
    183183    throwWarning: tr("{0} is not a valid reference", "{2.tag}");
    184184    group: tr("validation rules nat_ref in France");
    185185    -osmoseItemClassLevel: "9019/9019002/3";
    186186    -osmoseTags: list("ref", "highway");
    187     -osmoseAssertNoMatchWithContext: list("way highway=primary junction=roundabout nat_ref=80A901645_16D operator=DIRN", "inside=FR");
    188     -osmoseAssertNoMatchWithContext: list("way highway=service junction=roundabout nat_ref=80A801645_6D operator=DIRN", "inside=FR");
    189     -osmoseAssertNoMatchWithContext: list("way highway=primary junction=roundabout nat_ref=78A901319CD_15D operator=DIRN", "inside=FR");
    190     -osmoseAssertNoMatchWithContext: list("way highway=service junction=roundabout nat_ref=78A801319CD_1D operator=DIRN", "inside=FR");
     187    -osmoseAssertNoMatchWithContext: list("way highway=primary junction=roundabout nat_ref=80A901645_16D operator=DIRN", "inside=FX");
     188    -osmoseAssertNoMatchWithContext: list("way highway=service junction=roundabout nat_ref=80A801645_6D operator=DIRN", "inside=FX");
     189    -osmoseAssertNoMatchWithContext: list("way highway=primary junction=roundabout nat_ref=78A901319CD_15D operator=DIRN", "inside=FX");
     190    -osmoseAssertNoMatchWithContext: list("way highway=service junction=roundabout nat_ref=78A801319CD_1D operator=DIRN", "inside=FX");
    191191}
    192192
    193193/* tag nat_ref is well formed specific Paris (isidor format). no roundabout in Paris*/
    194 way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/][nat_ref][nat_ref!~/^(75Periph_Paris_[0-9]{2}_(1[0-9]|[1-9])D)$/][operator="VILLE DE PARIS"][inside("FR")] {
     194way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/][nat_ref][nat_ref!~/^(75Periph_Paris_[0-9]{2}_(1[0-9]|[1-9])D)$/][operator="VILLE DE PARIS"][inside("FX")] {
    195195    throwWarning: tr("{0} is not a valid reference (Paris)", "{1.tag}");
    196196    group: tr("validation rules nat_ref in France");
    197197    -osmoseItemClassLevel: "9019/9019002/3";
    198198    -osmoseTags: list("ref", "highway");
    199     -osmoseAssertNoMatchWithContext: list("way highway=trunk_link nat_ref=75Periph_Paris_05_3D operator=\"VILLE DE PARIS\"", "inside=FR");
    200     -osmoseAssertNoMatchWithContext: list("way highway=primary_link nat_ref=75Periph_Paris_05_13D operator=\"VILLE DE PARIS\"", "inside=FR");
     199    -osmoseAssertNoMatchWithContext: list("way highway=trunk_link nat_ref=75Periph_Paris_05_3D operator=\"VILLE DE PARIS\"", "inside=FX");
     200    -osmoseAssertNoMatchWithContext: list("way highway=primary_link nat_ref=75Periph_Paris_05_13D operator=\"VILLE DE PARIS\"", "inside=FX");
    201201}
    202202
    203203/* tag nat_ref is well formed for backward and forward (isidor format). No roundabout */
    204 way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:forward"]["nat_ref:forward"!~/^(([1-9][0-9]|0[1-9])[ANP]9[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D)$/][inside("FR")],
    205 way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:backward"]["nat_ref:backward"!~/^(([1-9][0-9]|0[1-9])[ANP]9[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D)$/][inside("FR")]{
     204way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:forward"]["nat_ref:forward"!~/^(([1-9][0-9]|0[1-9])[ANP]9[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D)$/][inside("FX")],
     205way[highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:backward"]["nat_ref:backward"!~/^(([1-9][0-9]|0[1-9])[ANP]9[0-9]{3}(|A|N)([0-9]?[0-9]|B1|B2)(|[A-Z]|[a-z])(|CD)_(1[0-9]|[1-9])D)$/][inside("FX")]{
    206206    throwWarning: tr("{0} is not a valid reference", "{1.tag}");
    207207    group: tr("validation rules nat_ref in France");
    208208    -osmoseItemClassLevel: "9019/9019002/3";
    209209    -osmoseTags: list("ref", "highway");
    210     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_1D nat_ref:backward=62A902615CD_2D operator=SANEF", "inside=FR");
    211     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_11D nat_ref:backward=62A902615CD_2D operator=SANEF", "inside=FR");
    212     -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_1D nat_ref:backward=62A902615CD_12D operator=SANEF", "inside=FR");
     210    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_1D nat_ref:backward=62A902615CD_2D operator=SANEF", "inside=FX");
     211    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_11D nat_ref:backward=62A902615CD_2D operator=SANEF", "inside=FX");
     212    -osmoseAssertNoMatchWithContext: list("way highway=motorway_link nat_ref:forward=62A902615CD_1D nat_ref:backward=62A902615CD_12D operator=SANEF", "inside=FX");
    213213}
    214214
    215215/* nat_ref reference without operator */
    216 way[highway][highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/][nat_ref][!operator][inside("FR")] {
     216way[highway][highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/][nat_ref][!operator][inside("FX")] {
    217217    throwWarning: tr("Missing tag operator with nat_ref");
    218218    group: tr("validation rules nat_ref in France");
     
    221221}
    222222
    223 way[highway][highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:forward"][!operator][inside("FR")],
    224 way[highway][highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:backward"][!operator][inside("FR")] {
     223way[highway][highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:forward"][!operator][inside("FX")],
     224way[highway][highway=~/^(motorway_link|trunk_link|primary_link|secondary_link|tertiary_link)$/]["nat_ref:backward"][!operator][inside("FX")] {
    225225    throwWarning: tr("Missing tag operator with nat_ref");
    226226    group: tr("validation rules nat_ref in France");