| 1 |
# Rules for naming objects, based on the following tags: |
| 2 |
# name, brand, operator, ref |
| 3 |
|
| 4 |
# delete FIXME values (they should be better used in maintenance maps) |
| 5 |
# better use option --ignore-fixme-values |
| 6 |
ref ~ '(?i)fix[ _]?+me' { delete ref; } |
| 7 |
operator ~ '(?i)fix[ _]?+me' { delete operator; } |
| 8 |
brand ~ '(?i)fix[ _]?+me' { delete brand; } |
| 9 |
name ~ '(?i)fix[ _]?+me' { delete name; } |
| 10 |
|
| 11 |
# delete duplicate names |
| 12 |
operator=${brand} { delete operator; } |
| 13 |
operator=${name} { delete operator; } |
| 14 |
brand=${name} { delete brand; } |
| 15 |
|
| 16 |
# None of operator, brand given |
| 17 |
ref=* & (operator!=* & brand!=*) & (highway=bus_stop | railway=tram_stop | railway=halt | railway=station) { name '${name} ${ref}' | '${ref}' } |
| 18 |
ref=* & (operator!=* & brand!=*) { name '${ref} ${name}' | '${ref}' } |
| 19 |
|
| 20 |
# Both operator and brand given |
| 21 |
operator=* & brand=* { |
| 22 |
name '${brand}: ${ref} ${name} (${operator})' | |
| 23 |
'${brand} ${ref} (${operator})' | |
| 24 |
'${brand}: ${name} (${operator})' | |
| 25 |
'${brand} (${operator})' |
| 26 |
} |
| 27 |
|
| 28 |
# One of operator or brand given |
| 29 |
operator=* & brand!=* & (highway=bus_stop | railway=tram_stop | railway=halt | railway=station) { |
| 30 |
name '${name} ${ref} ${operator}' | |
| 31 |
'${name} ${operator}' | |
| 32 |
'${ref} ${operator}' | |
| 33 |
'${operator}' |
| 34 |
} |
| 35 |
|
| 36 |
operator=* & brand!=* { |
| 37 |
name '${operator}: ${ref} ${name}' | |
| 38 |
'${operator}: ${name}' | |
| 39 |
'${operator}: ${ref}' | |
| 40 |
'${operator}' | |
| 41 |
'${ref}' |
| 42 |
} |
| 43 |
brand=* & operator!=* { |
| 44 |
name '${brand}: ${ref} ${name}' | |
| 45 |
'${brand}: ${name}' | |
| 46 |
'${brand}: ${ref}' | |
| 47 |
'${brand}' | |
| 48 |
'${ref}' |
| 49 |
} |