File: name

package info (click to toggle)
mkgmap 0.0.0%2Bsvn4923-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,068 kB
  • sloc: java: 73,955; xml: 1,719; python: 713; sh: 240; makefile: 147; perl: 31
file content (49 lines) | stat: -rw-r--r-- 1,551 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Rules for naming objects, based on the following tags:
# name, brand, operator, ref

# delete FIXME values (they should be better used in maintenance maps)
# better use option --ignore-fixme-values
ref ~ '(?i)fix[ _]?+me'		{ delete ref; } 
operator ~ '(?i)fix[ _]?+me'	{ delete operator; }
brand ~ '(?i)fix[ _]?+me'		{ delete brand; }
name ~ '(?i)fix[ _]?+me'		{ delete name; }

# delete duplicate names
operator=${brand} { delete operator; }
operator=${name}  { delete operator; }
brand=${name}     { delete brand; }

# None of operator, brand given
ref=* & (operator!=* & brand!=*) & (highway=bus_stop | railway=tram_stop | railway=halt | railway=station) { name '${name} ${ref}' | '${ref}' }
ref=* & (operator!=* & brand!=*) { name '${ref} ${name}' | '${ref}' }

# Both operator and brand given
operator=* & brand=* {
 name '${brand}: ${ref} ${name} (${operator})' |
      '${brand} ${ref} (${operator})' |
      '${brand}: ${name} (${operator})' |
      '${brand} (${operator})'
}

# One of operator or brand given
operator=* & brand!=* & (highway=bus_stop | railway=tram_stop | railway=halt | railway=station) {
 name '${name} ${ref} ${operator}' |
      '${name} ${operator}' |
      '${ref} ${operator}' |
      '${operator}'
}

operator=* & brand!=* {
 name '${operator}: ${ref} ${name}' |
      '${operator}: ${name}' |
      '${operator}: ${ref}' |
      '${operator}' |
      '${ref}'
}
brand=* & operator!=* {
 name '${brand}: ${ref} ${name}' |
      '${brand}: ${name}' | 
      '${brand}: ${ref}' |
      '${brand}' |
      '${ref}'
}