Merge pull request #2698 from vng/dev

Generator fixes
This commit is contained in:
ygorshenin 2016-04-07 12:14:34 +03:00
commit 09494f5ede
47 changed files with 465 additions and 3711 deletions

View file

@ -1887,7 +1887,7 @@ nb:3Museum|severdigheter
fi:3Museo|nähtävyydet
sw:Makumbusho|kivutio|utalii
waterway-waterfall|natural-waterfall
waterway-waterfall
en:2Waterfall|sights
cs:2Vodopád|zajímavost|pamětihodnost
sk:2Vodopád|pamätihodnosť

View file

@ -210,7 +210,6 @@ world +
difficult_alpine_hiking -
hiking -
mountain_hiking -
no-access -
permissive -
tunnel -
{}
@ -231,8 +230,6 @@ world +
path +
alpine_hiking -
bicycle -
bicycle-bridge -
bicycle-tunnel -
bridge -
demanding_alpine_hiking -
demanding_mountain_hiking -
@ -240,7 +237,6 @@ world +
hiking -
horse -
mountain_hiking -
no-access -
permissive -
tunnel -
{}
@ -491,7 +487,6 @@ world +
vineyard -
volcano -
water -
waterfall -
wetland +
bog -
marsh -

Binary file not shown.

View file

@ -13645,159 +13645,6 @@ cont {
}
}
}
cont {
name: "highway-footway-no-access"
element {
scale: 13
lines {
width: 1.0
color: 13683900
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 13683900
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 13683900
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 2.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 5.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 4.0
color: 13683900
dashdot {
dd: 1.0
dd: 3.0
}
priority: 1766
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 9.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 8.0
color: 13683900
dashdot {
dd: 1.0
dd: 3.0
}
priority: 1766
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 17.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 16.0
color: 13683900
dashdot {
dd: 1.0
dd: 4.0
}
priority: 1766
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
}
cont {
name: "highway-footway-permissive"
element {
@ -17507,438 +17354,6 @@ cont {
}
}
}
cont {
name: "highway-path-bicycle-bridge"
element {
scale: 13
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
}
cont {
name: "highway-path-bicycle-tunnel"
element {
scale: 13
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
}
cont {
name: "highway-path-bridge"
element {
@ -18961,142 +18376,6 @@ cont {
}
}
}
cont {
name: "highway-path-no-access"
element {
scale: 13
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
}
cont {
name: "highway-path-permissive"
element {
@ -44567,153 +43846,6 @@ cont {
}
}
}
cont {
name: "natural-waterfall"
element {
scale: 11
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 12
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 13
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 14
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 15
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 16
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 17
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 18
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 19
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
}
cont {
name: "natural-wetland"
element {

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -12483,159 +12483,6 @@ cont {
}
}
}
cont {
name: "highway-footway-no-access"
element {
scale: 13
lines {
width: 1.0
color: 13683900
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 13683900
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 13683900
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 2.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 5.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 4.0
color: 13683900
dashdot {
dd: 1.0
dd: 3.0
}
priority: 1766
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 9.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 8.0
color: 13683900
dashdot {
dd: 1.0
dd: 3.0
}
priority: 1766
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 17.0
color: 13683900
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 16.0
color: 13683900
dashdot {
dd: 1.0
dd: 4.0
}
priority: 1766
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 5263440
}
priority: 16033
}
}
}
cont {
name: "highway-footway-permissive"
element {
@ -16192,438 +16039,6 @@ cont {
}
}
}
cont {
name: "highway-path-bicycle-bridge"
element {
scale: 13
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
}
cont {
name: "highway-path-bicycle-tunnel"
element {
scale: 13
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
lines {
width: 9.0
color: 16777215
priority: 1029
join: ROUNDJOIN
cap: BUTTCAP
}
lines {
width: 11.0
color: 7368816
dashdot {
dd: 5.0
dd: 5.0
}
priority: 1026
join: ROUNDJOIN
cap: BUTTCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
}
cont {
name: "highway-path-bridge"
element {
@ -17646,142 +17061,6 @@ cont {
}
}
}
cont {
name: "highway-path-no-access"
element {
scale: 13
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 14
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
}
element {
scale: 15
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 16
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 17
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 18
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
element {
scale: 19
lines {
width: 1.0
color: 14127921
dashdot {
dd: 4.0
dd: 4.0
}
priority: 1033
join: ROUNDJOIN
cap: ROUNDCAP
}
path_text {
primary {
height: 10
color: 7368816
}
priority: 16033
}
}
}
cont {
name: "highway-path-permissive"
element {
@ -41664,105 +40943,6 @@ cont {
}
}
}
cont {
name: "natural-waterfall"
element {
scale: 14
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 15
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 16
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 17
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 18
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
element {
scale: 19
symbol {
name: "waterfall"
apply_for_type: 1
priority: 16000
}
caption {
primary {
height: 12
color: 255
offset_y: 10
}
priority: 15000
}
}
}
cont {
name: "natural-wetland"
element {

View file

@ -764,7 +764,7 @@ highway|footpath|no-access;[highway=footpath][access=no];x;name;int_name;763;hig
highway|footpath|tunnel;[highway=footpath][tunnel?];x;name;int_name;764;highway|footway
highway|footway|dike;[highway=footway][dike?];x;name;int_name;765;highway|footway
highway|footway|levee;[highway=footway][levee?];x;name;int_name;766;highway|footway
highway|footway|no-access;[highway=footway][access=no];;name;int_name;767;highway|footway
highway|footway|no-access;[highway=footway][access=no];x;name;int_name;767;highway|footway
highway|footway|t1;[highway=footway][t1];x;name;int_name;768;highway|footway
highway|footway|t3;[highway=footway][t3];x;name;int_name;769;highway|footway
highway|footway|t4;[highway=footway][t4];x;name;int_name;770;highway|footway
@ -785,16 +785,16 @@ highway|motorway|levee;[highway=motorway][levee?];x;name;int_name;784;highway|mo
highway|motorway_link|cycleway;[highway=motorway_link][cycleway?];x;name;int_name;785;highway|motorway
highway|path|area-bicycle;[highway=path][area?][bicycle?];x;name;int_name;786;highway|path
highway|path|area-horse;[highway=path][area?][horse?];x;name;int_name;787;highway|path
highway|path|bicycle-bridge;[highway=path][bicycle?][bridge?];;name;int_name;788;highway|path
highway|path|bicycle-construction;[highway=path][bicycle?][construction?];x;name;int_name;789;highway|path
highway|path|bicycle-disused;[highway=path][bicycle?][disused?];x;name;int_name;790;highway|path
highway|path|bicycle-tunnel;[highway=path][bicycle?][tunnel?];;name;int_name;791;highway|path
highway|path|bicycle-bridge;[highway=path][bicycle?][bridge?];x;name;int_name;788;highway|path|bicycle
highway|path|bicycle-construction;[highway=path][bicycle?][construction?];x;name;int_name;789;highway|path|bicycle
highway|path|bicycle-disused;[highway=path][bicycle?][disused?];x;name;int_name;790;highway|path|bicycle
highway|path|bicycle-tunnel;[highway=path][bicycle?][tunnel?];x;name;int_name;791;highway|path|bicycle
highway|path|bridge-horse;[highway=path][bridge?][horse?];x;name;int_name;792;highway|path
highway|path|construction-horse;[highway=path][construction?][horse?];x;name;int_name;793;highway|path
highway|path|disused-horse;[highway=path][disused?][horse?];x;name;int_name;794;highway|path
highway|path|horse-tunnel;[highway=path][horse?][tunnel?];x;name;int_name;795;highway|path
highway|path|levee;[highway=path][levee?];x;name;int_name;796;highway|path
highway|path|no-access;[highway=path][access=no];;name;int_name;797;highway|path
highway|path|no-access;[highway=path][access=no];x;name;int_name;797;highway|path
highway|path|t4;[highway=path][t4];x;name;int_name;798;highway|path
highway|path|t6;[highway=path][t6];x;name;int_name;799;highway|path
highway|pedestrian|cycleway;[highway=pedestrian][cycleway];x;name;int_name;800;highway|pedestrian
@ -954,7 +954,7 @@ amenity|ferry_terminal;[amenity=ferry_terminal];;name;int_name;953;
amenity;[amenity];;name;int_name;954;
shop|furniture;[shop=furniture];;name;int_name;955;
natural|grassland;[natural=grassland];;name;int_name;956;
natural|waterfall;[natural=waterfall];;name;int_name;957;
natural|waterfall;[natural=waterfall];x;name;int_name;957;waterway|waterfall
waterway|waterfall;[waterway=waterfall];;name;int_name;958;
railway|proposed;[railway=proposed];;name;int_name;959;
amenity|casino;[amenity=casino];;name;int_name;960;

1 building [building] addr:housenumber name 1
764 highway|footpath|tunnel [highway=footpath][tunnel?] x name int_name 764 highway|footway
765 highway|footway|dike [highway=footway][dike?] x name int_name 765 highway|footway
766 highway|footway|levee [highway=footway][levee?] x name int_name 766 highway|footway
767 highway|footway|no-access [highway=footway][access=no] x name int_name 767 highway|footway
768 highway|footway|t1 [highway=footway][t1] x name int_name 768 highway|footway
769 highway|footway|t3 [highway=footway][t3] x name int_name 769 highway|footway
770 highway|footway|t4 [highway=footway][t4] x name int_name 770 highway|footway
785 highway|motorway_link|cycleway [highway=motorway_link][cycleway?] x name int_name 785 highway|motorway
786 highway|path|area-bicycle [highway=path][area?][bicycle?] x name int_name 786 highway|path
787 highway|path|area-horse [highway=path][area?][horse?] x name int_name 787 highway|path
788 highway|path|bicycle-bridge [highway=path][bicycle?][bridge?] x name int_name 788 highway|path highway|path|bicycle
789 highway|path|bicycle-construction [highway=path][bicycle?][construction?] x name int_name 789 highway|path highway|path|bicycle
790 highway|path|bicycle-disused [highway=path][bicycle?][disused?] x name int_name 790 highway|path highway|path|bicycle
791 highway|path|bicycle-tunnel [highway=path][bicycle?][tunnel?] x name int_name 791 highway|path highway|path|bicycle
792 highway|path|bridge-horse [highway=path][bridge?][horse?] x name int_name 792 highway|path
793 highway|path|construction-horse [highway=path][construction?][horse?] x name int_name 793 highway|path
794 highway|path|disused-horse [highway=path][disused?][horse?] x name int_name 794 highway|path
795 highway|path|horse-tunnel [highway=path][horse?][tunnel?] x name int_name 795 highway|path
796 highway|path|levee [highway=path][levee?] x name int_name 796 highway|path
797 highway|path|no-access [highway=path][access=no] x name int_name 797 highway|path
798 highway|path|t4 [highway=path][t4] x name int_name 798 highway|path
799 highway|path|t6 [highway=path][t6] x name int_name 799 highway|path
800 highway|pedestrian|cycleway [highway=pedestrian][cycleway] x name int_name 800 highway|pedestrian
954 amenity [amenity] name int_name 954
955 shop|furniture [shop=furniture] name int_name 955
956 natural|grassland [natural=grassland] name int_name 956
957 natural|waterfall [natural=waterfall] x name int_name 957 waterway|waterfall
958 waterway|waterfall [waterway=waterfall] name int_name 958
959 railway|proposed [railway=proposed] name int_name 959
960 amenity|casino [amenity=casino] name int_name 960

11
data/replaced_tags.txt Normal file
View file

@ -0,0 +1,11 @@
atm=yes : amenity=atm
restaurant=yes : amenity=restaurant
hotel=yes : tourism=hotel
building=entrance : entrance=yes
natural=marsh : natural=wetland, wetland=marsh
natural=waterfall : waterway=waterfall
office=travel_agent : shop=travel_agency
shop=tailor : craft=tailor
shop=estate_agent : office=estate_agent
amenity=swimming_pool : leisure=swimming_pool

View file

@ -217,29 +217,45 @@ node|z19-[amenity=fire_station], area|z19-[amenity=fire_station] { icon-image: f
/* NATURAL*/
node|z11[natural=cave_entrance],area|z11[natural=cave] { icon-image: cave-s.svg;z-index: 2700; icon-min-distance: 20; }
node|z12-13[natural=cave_entrance],area|z12-13[natural=cave] { icon-image: cave-s.svg; text-offset: 8; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; icon-min-distance: 15; }
node|z14[natural=cave_entrance],area|z14[natural=cave] { icon-image: cave-s.svg; text-offset: 8; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; }
node|z15-17[natural=cave_entrance],area|z15-17[natural=cave] { icon-image: cave-m.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label; z-index: 2700; }
node|z18-[natural=cave_entrance],area|z18-[natural=cave] { icon-image: cave-l.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2700; }
node|z11 [natural=cave_entrance], area|z11 [natural=cave_entrance] { icon-image: cave-s.svg; z-index: 2700; icon-min-distance: 20; }
node|z12-13[natural=cave_entrance], area|z12-13[natural=cave_entrance] { icon-min-distance: 15; }
node|z12-[natural=cave_entrance], area|z12-[natural=cave_entrance]
{
icon-image: cave-s.svg;
text-offset: 8;
font-size: 10;
text: name;
text-color: @poi_label;
z-index: 2700;
}
node|z15-[natural=cave_entrance], area|z15-[natural=cave_entrance] { icon-image: cave-m.svg; text-offset: 10; font-size: 10; }
node|z18-[natural=cave_entrance], area|z18-[natural=cave_entrance] { icon-image: cave-l.svg; text-offset: 10; font-size: 11; }
node|z11[natural=waterfall],area|z11[natural=waterfall] { icon-image: waterfall-s.svg;z-index: 2700; icon-min-distance: 15; }
node|z12-14[natural=waterfall],area|z12-14[natural=waterfall] { icon-image: waterfall-s.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; }
node|z15-16[natural=waterfall],area|z15-16[natural=waterfall] { icon-image: waterfall-m.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label; z-index: 2700;}
node|z17-[natural=waterfall],area|z18-[natural=waterfall] { icon-image: waterfall-l.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label;z-index: 2700; }
node|z11 [waterway=waterfall], area|z11 [waterway=waterfall] { icon-image: waterfall-s.svg; z-index: 2700; icon-min-distance: 15; }
node|z12-[waterway=waterfall], area|z12-[waterway=waterfall]
{
icon-image: waterfall-s.svg;
text-offset: 10;
font-size: 10;
text: name;
text-position: center;
text-color: @poi_label;
z-index: 2700;
}
node|z15-[waterway=waterfall], area|z15-[waterway=waterfall] { icon-image: waterfall-m.svg; }
node|z17-[waterway=waterfall], area|z17-[waterway=waterfall] { icon-image: waterfall-l.svg; }
node|z11[waterway=waterfall],area|z11[waterway=waterfall] { icon-image: waterfall-s.svg; z-index: 2700; icon-min-distance: 15; }
node|z12-14[waterway=waterfall],area|z12-14[waterway=waterfall] { icon-image: waterfall-s.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; }
node|z15-16[waterway=waterfall],area|z15-17[waterway=waterfall] { icon-image: waterfall-m.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label; z-index: 2700;}
node|z17-[waterway=waterfall],area|z18-[waterway=waterfall] { icon-image: waterfall-l.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; }
node|z10-14[natural=volcano],{ icon-image: volcano-s.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; }
node|z15-16[natural=volcano],{ icon-image: volcano-m.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label; z-index: 2700;}
node|z17-[natural=volcano],{ icon-image: volcano-l.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label; z-index: 2700;}
area|z10-14[natural=volcano],{ icon-image: volcano-s.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; }
area|z15-16[natural=volcano],{ icon-image: volcano-m.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label; z-index: 2700;}
area|z17-[natural=volcano],{ icon-image: volcano-l.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label;z-index: 2700; }
node|z10-[natural=volcano], area|z10-[natural=volcano]
{
icon-image: volcano-s.svg;
text-offset: 10;
font-size: 10;
text: name;
text-color: @poi_label;
z-index: 2700;
}
node|z15-[natural=volcano], area|z15-[natural=volcano] { icon-image: volcano-m.svg; }
node|z17-[natural=volcano], area|z17-[natural=volcano] { icon-image: volcano-l.svg; }
node|z12[natural=peak][name],
@ -456,9 +472,9 @@ node|z16-[man_made=windmill], area|z16-[man_made=windmill]{ icon-image: windmill
node|z16-[sport=equestrian], area|z16-[sport=equestrian]{ icon-image: equestrian-m.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400;icon-min-distance: 30;}
/* Declare common SHOPS for z15- */
node|z15-[shop], area|z15-[shop] { icon-image: shop-m.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; icon-min-distance: 0; }
node|z15-[shop], area|z15-[shop] { icon-image: shop-m.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; }
node|z15-[shop=alcohol], area|z15-[shop=alcohol] { icon-image: alcohol-m.svg; icon-min-distance: 20; }
node|z15-[shop=alcohol], area|z15-[shop=alcohol] { icon-image: alcohol-m.svg; }
node|z15-[shop=books], area|z15-[shop=books] { icon-image: book-shop-m.svg; }
node|z15-[shop=bakery], area|z15-[shop=bakery] { icon-image: bakery-m.svg; }
node|z15-[shop=beauty], area|z15-[shop=beauty] { icon-image: beauty-m.svg; }
@ -485,13 +501,17 @@ node|z15-[shop=hairdresser], area|z15-[shop=hairdresser] { icon-image: hairdress
node|z15-[shop=hardware], area|z15-[shop=hardware] { icon-image: hardware-m.svg; }
node|z15-[shop=jewelry], area|z15-[shop=jewelry] { icon-image: jewelry-m.svg; }
node|z15-[shop=kiosk], area|z15-[shop=kiosk] { icon-image: kiosk-m.svg; }
node|z15-[shop=laundry], area|z15-[shop=laundry] { icon-image:laundry-m.svg; icon-min-distance: 20; }
node|z15-[shop=laundry], area|z15-[shop=laundry] { icon-image:laundry-m.svg; }
node|z15-[shop=mobile_phone], area|z15-[shop=mobile_phone] { icon-image: mobile_phone-m.svg; }
node|z15-[shop=optician], area|z15-[shop=optician] { icon-image: optician-m.svg; }
node|z15-[shop=shoes], area|z15-[shop=shoes] { icon-image: shoes-m.svg; }
node|z15-[shop=sports], area|z15-[shop=sports] { icon-image: sports-m.svg; }
node|z15-[shop=toys], area|z15-[shop=toys] { icon-image: toys-m.svg; }
/* Reduce icon drawing priority on high levels for some shops */
node|z15-16[shop=alcohol], area|z15-16[shop=alcohol] { icon-min-distance: 20; }
node|z15-16[shop=laundry], area|z15-16[shop=laundry] { icon-min-distance: 20; }
node|z16-[tourism=caravan_site], area|z16-[tourism=caravan_site]{ icon-image: caravan_site-m.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label;z-index: 2400;icon-min-distance: 30; }
node|z16-[tourism=guest_house], area|z16-[tourism=guest_house]{ icon-image: motel-m.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400;icon-min-distance: 30;}
@ -516,9 +536,9 @@ node|z17-[man_made=windmill], area|z17-[man_made=windmill]{ icon-image: windmill
node|z17-[sport=equestrian], area|z17-[sport=equestrian]{ icon-image: equestrian-l.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400;icon-min-distance: 20;}
/* Declare common SHOPS for z17- */
node|z17-[shop], area|z17-[shop] { icon-image: shop-l.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; icon-min-distance: 0; }
node|z17-[shop], area|z17-[shop] { icon-image: shop-l.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; }
node|z17-[shop=alcohol], area|z17-[shop=alcohol] { icon-image: alcohol-l.svg; icon-min-distance: 20; }
node|z17-[shop=alcohol], area|z17-[shop=alcohol] { icon-image: alcohol-l.svg; }
node|z17-[shop=books], area|z17-[shop=books]{ icon-image: book-shop-l.svg; }
node|z17-[shop=bakery], area|z17-[shop=bakery] { icon-image: bakery-l.svg; }
node|z17-[shop=beauty], area|z17-[shop=beauty] { icon-image: beauty-l.svg; }
@ -545,7 +565,7 @@ node|z17-[shop=hairdresser], area|z17-[shop=hairdresser] { icon-image: hairdress
node|z17-[shop=hardware], area|z17-[shop=hardware]{ icon-image: hardware-l.svg; }
node|z17-[shop=jewelry], area|z17-[shop=jewelry] { icon-image: jewelry-l.svg; }
node|z17-[shop=kiosk], area|z17-[shop=kiosk]{ icon-image: kiosk-l.svg; }
node|z17-[shop=laundry], area|z17-[shop=laundry] { icon-image:laundry-l.svg; icon-min-distance: 20; }
node|z17-[shop=laundry], area|z17-[shop=laundry] { icon-image:laundry-l.svg; }
node|z17-[shop=mobile_phone], area|z17-[shop=mobile_phone]{ icon-image: mobile_phone-l.svg; }
node|z17-[shop=optician], area|z17-[shop=optician]{ icon-image: optician-l.svg; }
node|z17-[shop=shoes], area|z17-[shop=shoes]{ icon-image: shoes-l.svg; }
@ -604,14 +624,12 @@ node|z17-[shop=supermarket], area|z17-[shop=supermarket] { icon-image: grocery-l
node|z13-[amenity=marketplace], area|z13-[amenity=marketplace] { icon-image: marketplace-s.svg; text-offset: 10; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; icon-min-distance: 20; }
node|z15-[amenity=marketplace], area|z15-[amenity=marketplace] { icon-image: marketplace-m.svg; text-offset: 11; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; icon-min-distance: 15; }
node|z17-[amenity=marketplace], area|z17-[amenity=marketplace] { icon-image: marketplace-l.svg; text-offset: 11; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; }
node|z17-[shop=alcohol], area|z17-[shop=alcohol] { icon-min-distance: 0; }
node|z17-[shop=laundry], area|z17-[shop=laundry] { icon-min-distance: 0; }
node|z17-[amenity=marketplace], area|z17-[amenity=marketplace] { icon-image: marketplace-l.svg; text-offset: 11; font-size: 11; text: name; text-color: @poi_label; z-index: 2400; icon-min-distance: 0; }
/* SPORT */
/* LEISURE */
node|z13-14[sport=soccer], area|z13-14[sport=soccer] { icon-image: soccer-s.svg; text-offset: 10; font-size: 10; text: name; text-color: @poi_label;z-index: 6;icon-min-distance: 50; }
node|z13-14[leisure=swimming_pool],area|z13-14[leisure=swimming_pool] { icon-image: swimming-s.svg;z-index: 2600;icon-min-distance: 50; }

View file

@ -1528,37 +1528,39 @@ area|z16-[natural=wetland],
}
/* water LABELS */
line[waterway]
{
text-position: line;
}
area|z10-[natural=lake][bbox_area>=4000000],
area|z10-[landuse=reservoir][bbox_area>=4000000],
area|z10-[natural=water][bbox_area>=4000000]
{text: name;
font-size: 9;
text-color: @water_label;
z-index: 10000;}
area|z10-[natural=water][bbox_area>=4000000],
{
text: name;
font-size: 9;
text-color: @water_label;
z-index: 10000;
}
area|z10-[natural=lake][bbox_area<4000000],
area|z10-[landuse=reservoir][bbox_area<4000000],
area|z10-[natural=water][bbox_area<4000000]
{}
area|z10-[natural=water][bbox_area<4000000],
{
}
/*
area|z12-[natural=lake][bbox_area>=10000000],
area|z12-[landuse=reservoir][bbox_area>=10000000],
area|z12-[natural=water][bbox_area>=10000000]
{text: name;
{
text: name;
font-size: 10;
text-color: @water_label;
z-index: 300;}
z-index: 300;
}
area|z12-[natural=lake][bbox_area<10000000],
area|z12-[landuse=reservoir][bbox_area<10000000],
area|z12-[natural=water][bbox_area<10000000]
{}
*/
area|z12-[natural=water][bbox_area<10000000],
{
}
*/
line[waterway]
{

View file

@ -764,7 +764,7 @@ highway|footway
highway|footway
highway|footway
highway|footway
highway|footway|no-access
highway|footway
highway|footway
highway|footway
highway|footway
@ -785,16 +785,16 @@ highway|motorway
highway|motorway
highway|path
highway|path
highway|path|bicycle-bridge
highway|path
highway|path
highway|path|bicycle-tunnel
highway|path|bicycle
highway|path|bicycle
highway|path|bicycle
highway|path|bicycle
highway|path
highway|path
highway|path
highway|path
highway|path
highway|path
highway|path|no-access
highway|path
highway|path
highway|pedestrian
@ -954,7 +954,7 @@ amenity|ferry_terminal
amenity
shop|furniture
natural|grassland
natural|waterfall
waterway|waterfall
waterway|waterfall
railway|proposed
amenity|casino

View file

@ -210,7 +210,6 @@ world 00000000000000000000 +
difficult_alpine_hiking 00000000000001111111 -
hiking 00000000000001111111 -
mountain_hiking 00000000000001111111 -
no-access 00000000000001111111 -
permissive 00000000000001111111 -
tunnel 00000000000001111111 -
{}
@ -231,8 +230,6 @@ world 00000000000000000000 +
path 00000000000001111111 +
alpine_hiking 00000000000001111111 -
bicycle 00000000000001111111 -
bicycle-bridge 00000000000001111111 -
bicycle-tunnel 00000000000001111111 -
bridge 00000000000001111111 -
demanding_alpine_hiking 00000000000001111111 -
demanding_mountain_hiking 00000000000001111111 -
@ -240,7 +237,6 @@ world 00000000000000000000 +
hiking 00000000000001111111 -
horse 00000000000001111111 -
mountain_hiking 00000000000001111111 -
no-access 00000000000001111111 -
permissive 00000000000001111111 -
tunnel 00000000000001111111 -
{}
@ -491,7 +487,6 @@ world 00000000000000000000 +
vineyard 00000000000000011111 -
volcano 00000000000011111111 -
water 11111111111111111111 -
waterfall 00000000000000111111 -
wetland 00000000000000111111 +
bog 00000000000011111111 -
marsh 00000000000000111111 -

View file

@ -68,3 +68,5 @@
#define EXTERNAL_RESOURCES_FILE "external_resources.txt"
#define GPS_TRACK_FILENAME "gps_track.dat"
#define PEPLACED_TAGS_FILE "replaced_tags.txt"

View file

@ -26,7 +26,8 @@ UNIT_TEST(FBuilder_ManyTypes)
char const * arr2[][2] = {
{ "place", "country" },
{ "place", "state" },
{ "place", "county" },
/// @todo Can't realize is it deprecated or we forgot to add clear styles for it.
//{ "place", "county" },
{ "place", "region" },
{ "place", "city" },
{ "place", "town" },
@ -53,7 +54,7 @@ UNIT_TEST(FBuilder_ManyTypes)
TEST(fb2.CheckValid(), ());
TEST_EQUAL(fb1, fb2, ());
TEST_EQUAL(fb2.GetTypesCount(), 7, ());
TEST_EQUAL(fb2.GetTypesCount(), 6, ());
}
UNIT_TEST(FBuilder_LineTypes)
@ -91,6 +92,35 @@ UNIT_TEST(FBuilder_LineTypes)
TEST_EQUAL(fb2.GetTypesCount(), 4, ());
}
UNIT_TEST(FBuilder_Waterfall)
{
classificator::Load();
FeatureBuilder1 fb1;
FeatureParams params;
char const * arr[][2] = {{"waterway", "waterfall"}};
AddTypes(params, arr);
TEST(params.FinishAddingTypes(), ());
fb1.SetParams(params);
fb1.SetCenter(m2::PointD(1, 1));
TEST(fb1.RemoveInvalidTypes(), ());
TEST(fb1.CheckValid(), ());
FeatureBuilder1::TBuffer buffer;
TEST(fb1.PreSerialize(), ());
fb1.Serialize(buffer);
FeatureBuilder1 fb2;
fb2.Deserialize(buffer);
TEST(fb2.CheckValid(), ());
TEST_EQUAL(fb1, fb2, ());
TEST_EQUAL(fb2.GetTypesCount(), 1, ());
}
UNIT_TEST(FVisibility_RemoveNoDrawableTypes)
{
classificator::Load();
@ -107,7 +137,7 @@ UNIT_TEST(FVisibility_RemoveNoDrawableTypes)
{
vector<uint32_t> types;
types.push_back(c.GetTypeByPath({ "amenity" }));
types.push_back(c.GetTypeByPath({ "highway", "primary" }));
types.push_back(c.GetTypeByPath({ "building" }));
TEST(feature::RemoveNoDrawableTypes(types, feature::GEOM_AREA, true), ());

View file

@ -328,7 +328,7 @@ UNIT_TEST(OsmType_Capital)
{
char const * arr[][2] = {
{ "place", "city" },
{ "admin_level", "6" },
{ "admin_level", "4" },
{ "boundary", "administrative" },
{ "capital", "2" },
{ "place", "city" },
@ -342,7 +342,7 @@ UNIT_TEST(OsmType_Capital)
TEST_EQUAL(params.m_Types.size(), 2, (params));
TEST(params.IsTypeExist(GetType({"place", "city", "capital", "2"})), ());
TEST(params.IsTypeExist(GetType({"boundary", "administrative", "6"})), ());
TEST(params.IsTypeExist(GetType({"boundary", "administrative", "4"})), ());
}
}
@ -571,7 +571,7 @@ UNIT_TEST(OsmType_Ferry)
UNIT_TEST(OsmType_Boundary)
{
char const * arr[][2] = {
{ "admin_level", "6" },
{ "admin_level", "4" },
{ "boundary", "administrative" },
{ "admin_level", "2" },
{ "boundary", "administrative" },
@ -585,7 +585,7 @@ UNIT_TEST(OsmType_Boundary)
TEST_EQUAL(params.m_Types.size(), 2, (params));
TEST(params.IsTypeExist(GetType({"boundary", "administrative", "2"})), ());
TEST(params.IsTypeExist(GetType({"boundary", "administrative", "6"})), ());
TEST(params.IsTypeExist(GetType({"boundary", "administrative", "4"})), ());
}
UNIT_TEST(OsmType_Dibrugarh)

View file

@ -399,8 +399,7 @@ namespace ftype
bool hasLayer = false;
char const * layer = nullptr;
bool isSubwayEntrance = false;
bool isSubwayStation = false;
bool isSubway = false;
TagProcessor(p).ApplyRules
({
@ -408,20 +407,20 @@ namespace ftype
{ "tunnel", "yes", [&layer] { layer = "-1"; }},
{ "layer", "*", [&hasLayer] { hasLayer = true; }},
{ "railway", "subway_entrance", [&isSubwayEntrance] { isSubwayEntrance = true; }},
{ "railway", "subway_entrance", [&isSubway] { isSubway = true; }},
/// @todo Unfortunatelly, it's not working in many cases (route=subway, transport=subway).
/// Actually, it's better to process subways after feature types assignment.
{ "station", "subway", [&isSubwayStation] { isSubwayStation = true; }},
{ "station", "subway", [&isSubway] { isSubway = true; }},
});
if (!hasLayer && layer)
p->AddTag("layer", layer);
// Tag 'city' is needed for correct selection of metro icons.
if (isSubwayEntrance || isSubwayStation)
if (isSubway && p->type == OsmElement::EntityType::Node)
{
string const & city = MatchCity(p);
string const city = MatchCity(p);
if (!city.empty())
p->AddTag("city", city);
}
@ -473,6 +472,8 @@ namespace ftype
highwayDone = true;
}
/// @todo Probably, we can delete this processing because cities
/// are matched by limit rect in MatchCity.
if (!subwayDone && types.IsRwSubway(vTypes[i]))
{
TagProcessor(p).ApplyRules

View file

@ -54,6 +54,12 @@ struct OsmElement
{
return key == e.key && value == e.value;
}
bool operator < (Tag const & e) const
{
if (key == e.key)
return value < e.value;
return key < e.key;
}
};
EntityType type = EntityType::Unknown;

View file

@ -13,6 +13,9 @@
#include "generator/world_map_generator.hpp"
#include "indexer/classificator.hpp"
#include "platform/platform.hpp"
#include "geometry/mercator.hpp"
#include "coding/parse_xml.hpp"
@ -505,9 +508,17 @@ bool GenerateFeaturesImpl(feature::GenerateInfo & info)
bucketer, cache, info.m_makeCoasts ? classif().GetCoastType() : 0,
info.GetAddressesFileName());
TagAdmixer tagAdmixer(info.GetIntermediateFileName("ways",".csv"), info.GetIntermediateFileName("towns",".csv"));
TagAdmixer tagAdmixer(info.GetIntermediateFileName("ways", ".csv"),
info.GetIntermediateFileName("towns", ".csv"));
TagReplacer tagReplacer(GetPlatform().ResourcesDir() + PEPLACED_TAGS_FILE);
// Here we can add new tags to element!!!
auto fn = [&parser, &tagAdmixer](OsmElement * e) { parser.EmitElement(tagAdmixer(e)); };
auto const fn = [&](OsmElement * e)
{
tagReplacer(e);
tagAdmixer(e);
parser.EmitElement(e);
};
SourceReader reader = info.m_osmFileName.empty() ? SourceReader() : SourceReader(info.m_osmFileName);
switch (info.m_osmFileType)

View file

@ -1,8 +1,10 @@
#include "search_index_builder.hpp"
#include "search/reverse_geocoder.hpp"
#include "search/search_common.hpp"
#include "search/search_index_values.hpp"
#include "search/search_trie.hpp"
#include "search/types_skipper.hpp"
#include "indexer/categories_holder.hpp"
#include "indexer/classificator.hpp"
@ -16,9 +18,6 @@
#include "indexer/search_delimiters.hpp"
#include "indexer/search_string_utils.hpp"
#include "indexer/trie_builder.hpp"
#include "indexer/types_skipper.hpp"
#include "search/search_common.hpp"
#include "defines.hpp"

View file

@ -3,6 +3,7 @@
#include "generator/osm_element.hpp"
#include "base/logging.hpp"
#include "base/stl_add.hpp"
#include "base/string_utils.hpp"
#include "std/fstream.hpp"
@ -101,18 +102,13 @@ public:
}
}
OsmElement * operator()(OsmElement * e)
void operator()(OsmElement * e)
{
if (e == nullptr)
return e;
if (e->type == OsmElement::EntityType::Way && m_ways.find(e->id) != m_ways.end())
{
// Exclude ferry routes.
if (find(e->Tags().begin(), e->Tags().end(), m_ferryTag) != e->Tags().end())
return e;
e->AddTag("highway", m_ways[e->id]);
return e;
if (find(e->Tags().begin(), e->Tags().end(), m_ferryTag) == e->Tags().end())
e->AddTag("highway", m_ways[e->id]);
}
else if (e->type == OsmElement::EntityType::Node && m_capitals.find(e->id) != m_capitals.end())
{
@ -126,7 +122,6 @@ public:
v = "45000";
});
}
return e;
}
private:
@ -134,3 +129,54 @@ private:
set<uint64_t> m_capitals;
OsmElement::Tag const m_ferryTag;
};
class TagReplacer
{
map<OsmElement::Tag, vector<string>> m_entries;
public:
TagReplacer(string const & filePath)
{
ifstream stream(filePath);
OsmElement::Tag tag;
vector<string> values;
string line;
while (std::getline(stream, line))
{
if (line.empty())
continue;
strings::SimpleTokenizer iter(line, " \t=,:");
if (!iter)
continue;
tag.key = *iter;
++iter;
if (!iter)
continue;
tag.value = *iter;
values.clear();
while (++iter)
values.push_back(*iter);
if (values.size() >= 2 && values.size() % 2 == 0)
m_entries[tag].swap(values);
}
}
void operator()(OsmElement * p)
{
for (auto & tag : p->m_tags)
{
auto it = m_entries.find(tag);
if (it != m_entries.end())
{
auto const & v = it->second;
tag.key = v[2];
tag.value = v[3];
for (size_t i = 4; i < v.size(); i += 2)
p->AddTag(v[i], v[i + 1]);
}
}
}
};

View file

@ -46,23 +46,9 @@ namespace classificator
Platform & p = GetPlatform();
MapStyle const originMapStyle = GetStyleReader().GetCurrentStyle();
ReadCommon(p.GetReader("classificator.txt"), p.GetReader("types.txt"));
for (size_t i = 0; i < MapStyleCount; ++i)
{
MapStyle const mapStyle = static_cast<MapStyle>(i);
// Read the merged style only if it was requested.
if (mapStyle != MapStyleMerged || originMapStyle == MapStyleMerged)
{
GetStyleReader().SetCurrentStyle(mapStyle);
ReadCommon(p.GetReader("classificator.txt"),
p.GetReader("types.txt"));
drule::LoadRules();
}
}
GetStyleReader().SetCurrentStyle(originMapStyle);
drule::LoadRules();
LOG(LDEBUG, ("Reading of classificator finished"));
}

View file

@ -21,12 +21,12 @@ class BaseChecker
protected:
vector<uint32_t> m_types;
virtual bool IsMatched(uint32_t type) const;
BaseChecker(size_t level = 2) : m_level(level) {}
virtual ~BaseChecker() = default;
public:
virtual bool IsMatched(uint32_t type) const;
bool operator() (feature::TypesHolder const & types) const;
bool operator() (FeatureType const & ft) const;
bool operator() (vector<uint32_t> const & types) const;

View file

@ -54,7 +54,6 @@ SOURCES += \
search_delimiters.cpp \ # it's in indexer because of CategoriesHolder dependency.
search_string_utils.cpp \ # it's in indexer because of CategoriesHolder dependency.
types_mapping.cpp \
types_skipper.cpp \
HEADERS += \
categories_holder.hpp \
@ -117,7 +116,6 @@ HEADERS += \
trie_builder.hpp \
trie_reader.hpp \
types_mapping.hpp \
types_skipper.hpp \
unique_index.hpp \
OTHER_FILES += drules_struct.proto

View file

@ -9,42 +9,32 @@
#include "base/logging.hpp"
UNIT_TEST(VisibleScales_Smoke)
{
classificator::Load();
{
char const * arr[] = { "place", "city", "capital" };
uint32_t const type = classif().GetTypeByPath(vector<string>(arr, arr + 3));
pair<int, int> const r = feature::GetDrawableScaleRange(type);
TEST_NOT_EQUAL(r.first, -1, ());
TEST_LESS_OR_EQUAL(r.first, r.second, ());
TEST(my::between_s(r.first, r.second, 10), (r));
TEST(!my::between_s(r.first, r.second, 1), (r));
TEST(!my::between_s(r.first, r.second, scales::GetUpperScale()), (r));
}
}
namespace
{
class DoGetMaxLowMinHighZoom
{
Classificator const & m_classif;
pair<int, int> m_res;
string m_low;
set<uint32_t> m_skip;
bool IsSkip(uint32_t t) const
{
ftype::TruncValue(t, 2);
return m_skip.count(t) > 0;
}
public:
DoGetMaxLowMinHighZoom(Classificator const & c) : m_res(-1, 1000)
DoGetMaxLowMinHighZoom(Classificator const & c)
: m_classif(classif()), m_res(-1, 1000)
{
char const * arr[][2] = {
{ "highway", "proposed" },
{ "highway", "bus_stop" },
{ "highway", "world_level" },
{ "highway", "world_towns_level" }
{"highway", "bus_stop"},
{"highway", "speed_camera"},
{"highway", "platform"},
{"highway", "world_level"},
{"highway", "world_towns_level"},
};
for (size_t i = 0; i < ARRAY_SIZE(arr); ++i)
@ -53,11 +43,15 @@ public:
void operator() (ClassifObject const * p, uint32_t type)
{
if (m_skip.count(type) > 0)
if (IsSkip(type))
return;
pair<int, int> const r = feature::GetDrawableScaleRange(type);
ASSERT(r.first != -1 && r.second != -1, (r));
if (r.first == -1 || r.second == -1)
{
LOG(LINFO, (r, m_classif.GetFullObjectName(type)));
return;
}
if (m_res.first < r.first)
{

View file

@ -2,6 +2,8 @@
#include "base/assert.hpp"
MapStyle const kDefaultMapStyle = MapStyleClear;
string DebugPrint(MapStyle mapStyle)
{
switch (mapStyle)

View file

@ -14,4 +14,6 @@ enum MapStyle
MapStyleCount
};
extern MapStyle const kDefaultMapStyle;
string DebugPrint(MapStyle mapStyle);

View file

@ -38,7 +38,7 @@ string GetStyleSuffix(MapStyle mapStyle)
} // namespace
StyleReader::StyleReader()
: m_mapStyle(MapStyleLight)
: m_mapStyle(kDefaultMapStyle)
{
}

View file

@ -49,7 +49,8 @@ public:
void operator() (TFeature const & ft, uint32_t index) const
{
m_scalesIdx = 0;
uint32_t minScaleClassif = feature::GetMinDrawableScaleClassifOnly(ft);
uint32_t const minScaleClassif = min(scales::GetUpperScale(),
feature::GetMinDrawableScaleClassifOnly(ft));
// The classificator won't allow this feature to be drawable for smaller
// scales so the first buckets can be safely skipped.
// todo(@pimenov) Parallelizing this loop may be helpful.

View file

@ -291,9 +291,9 @@ Framework::Framework()
, m_lastReportedCountry(kInvalidCountryId)
{
// Restore map style before classificator loading
int mapStyle = MapStyleLight;
int mapStyle;
if (!settings::Get(kMapStyleKey, mapStyle))
mapStyle = MapStyleClear;
mapStyle = kDefaultMapStyle;
GetStyleReader().SetCurrentStyle(static_cast<MapStyle>(mapStyle));
m_connectToGpsTrack = GpsTracker::Instance().IsEnabled();

View file

@ -154,9 +154,9 @@ void GpsTrack::InitStorageIfNeed()
{
m_storage = make_unique<GpsTrackStorage>(m_filePath, m_maxItemCount);
}
catch (RootException & e)
catch (RootException const & e)
{
LOG(LINFO, ("Storage has not been created:", e.Msg()));
LOG(LWARNING, ("Track storage creation error:", e.Msg()));
}
}
@ -203,9 +203,9 @@ void GpsTrack::InitCollection(hours duration)
m_collection->Add(points, evictedIds);
}
}
catch (RootException & e)
catch (RootException const & e)
{
LOG(LINFO, ("Storage has caused exception:", e.Msg()));
LOG(LWARNING, ("Track storage exception:", e.Msg()));
m_collection->Clear();
m_storage.reset();
}
@ -266,9 +266,9 @@ void GpsTrack::UpdateStorage(bool needClear, vector<location::GpsInfo> const & p
m_storage->Append(points);
}
catch (RootException & e)
catch (RootException const & e)
{
LOG(LINFO, ("Storage has caused exception:", e.Msg()));
LOG(LWARNING, ("Track storage exception:", e.Msg()));
m_storage.reset();
}
}

View file

@ -116,23 +116,24 @@ GpsTrackStorage::GpsTrackStorage(string const & filePath, size_t maxItemCount)
{
uint32_t version = 0;
if (!ReadVersion(m_stream, version))
MYTHROW(OpenException, ("File:", m_filePath));
MYTHROW(OpenException, ("Read version error.", m_filePath));
if (version == kCurrentVersion)
{
// Seek to end to get file size
m_stream.seekp(0, ios::end);
if (!m_stream.good())
MYTHROW(OpenException, ("File:", m_filePath));
MYTHROW(OpenException, ("Seek to the end error.", m_filePath));
size_t const fileSize = m_stream.tellp();
m_itemCount = GetItemCount(fileSize);
// Set write position after last item position
m_stream.seekp(GetItemOffset(m_itemCount), ios::beg);
size_t const offset = GetItemOffset(m_itemCount);
m_stream.seekp(offset, ios::beg);
if (!m_stream.good())
MYTHROW(OpenException, ("File:", m_filePath));
MYTHROW(OpenException, ("Seek to the offset error:", offset, m_filePath));
}
else
{
@ -148,10 +149,10 @@ GpsTrackStorage::GpsTrackStorage(string const & filePath, size_t maxItemCount)
m_stream.open(m_filePath, ios::in | ios::out | ios::binary | ios::trunc);
if (!m_stream)
MYTHROW(OpenException, ("File:", m_filePath));
MYTHROW(OpenException, ("Open file error.", m_filePath));
if (!WriteVersion(m_stream, kCurrentVersion))
MYTHROW(OpenException, ("File:", m_filePath));
MYTHROW(OpenException, ("Write version error.", m_filePath));
m_itemCount = 0;
}

View file

@ -1,10 +1,10 @@
#include "testing/testing.hpp"
#include "helpers.hpp"
#include "indexer/classificator.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/feature_visibility.hpp"
#include "indexer/feature_data.hpp"
#include "indexer/map_style_reader.hpp"
#include "base/logging.hpp"
@ -22,41 +22,12 @@ namespace
TEST(false, ("Inconsistency type", type, m_c.GetFullObjectName(type)));
}
};
// Some tests require MapStyleLight (legacy) set as default.
// But unfortunately current map style is stored as global variable.
// Therefore, to reset current map style to the MapStyleLight, this RAII is used.
class ResetMapStyleRAII
{
public:
ResetMapStyleRAII() = default;
~ResetMapStyleRAII()
{
GetStyleReader().SetCurrentStyle(MapStyleLight);
}
};
void RunForEveryMapStyle(std::function<void()> const & fn)
{
ResetMapStyleRAII resetMapStype;
for (size_t s = 0; s < MapStyleCount; ++s)
{
MapStyle const mapStyle = static_cast<MapStyle>(s);
if (mapStyle != MapStyle::MapStyleMerged)
{
GetStyleReader().SetCurrentStyle(mapStyle);
LOG(LINFO, ("Test with map style", mapStyle));
fn();
}
}
}
} // namespace
UNIT_TEST(Classificator_CheckConsistency)
{
RunForEveryMapStyle([]()
styles::RunForEveryMapStyle([](MapStyle)
{
classificator::Load();
Classificator const & c = classif();
DoCheckConsistency doCheck(c);
@ -130,9 +101,8 @@ void CheckLineStyles(Classificator const & c, string const & name)
UNIT_TEST(Classificator_DrawingRules)
{
RunForEveryMapStyle([]()
styles::RunForEveryMapStyle([](MapStyle)
{
classificator::Load();
Classificator const & c = classif();
LOG(LINFO, ("--------------- Point styles ---------------"));
@ -192,9 +162,8 @@ pair<int, int> GetMinMax(int level, vector<uint32_t> const & types)
UNIT_TEST(Classificator_AreaPriority)
{
RunForEveryMapStyle([]()
styles::RunForEveryMapStyle([](MapStyle)
{
classificator::Load();
Classificator const & c = classif();
vector<vector<uint32_t> > types;

View file

@ -1,9 +1,9 @@
#include "testing/testing.hpp"
#include "helpers.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/drawing_rules.hpp"
#include "indexer/drules_struct.pb.h"
#include "indexer/map_style_reader.hpp"
namespace
{
@ -16,15 +16,8 @@ double constexpr kMaxDashLength = 128 / kMaxVisualScale;
UNIT_TEST(Test_Dashes)
{
for (size_t s = 0; s < MapStyleCount; ++s)
styles::RunForEveryMapStyle([](MapStyle)
{
MapStyle const mapStyle = static_cast<MapStyle>(s);
if (mapStyle == MapStyleMerged)
continue;
GetStyleReader().SetCurrentStyle(mapStyle);
classificator::Load();
drule::rules().ForEachRule([](int, int, int, drule::BaseRule const * rule)
{
LineDefProto const * const line = rule->GetLine();
@ -41,5 +34,5 @@ UNIT_TEST(Test_Dashes)
TEST_LESS_OR_EQUAL(value, kMaxDashLength, ());
}
});
}
});
}

View file

@ -0,0 +1,35 @@
#pragma once
#include "indexer/classificator_loader.hpp"
#include "indexer/map_style.hpp"
#include "indexer/map_style_reader.hpp"
#include "base/logging.hpp"
#include "std/function.hpp"
namespace styles
{
template <class TFn>
void RunForEveryMapStyle(TFn && fn)
{
auto & reader = GetStyleReader();
for (size_t s = 0; s < MapStyleCount; ++s)
{
MapStyle const mapStyle = static_cast<MapStyle>(s);
if (mapStyle != MapStyle::MapStyleMerged)
{
reader.SetCurrentStyle(mapStyle);
classificator::Load();
LOG(LINFO, ("Test with map style", mapStyle));
fn(mapStyle);
}
}
// Restore default style.
reader.SetCurrentStyle(kDefaultMapStyle);
classificator::Load();
}
} // namespace styles

View file

@ -1,4 +1,5 @@
#include "testing/testing.hpp"
#include "helpers.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/drawing_rules.hpp"
@ -68,22 +69,15 @@ UNIT_TEST(Test_SymbolsConsistency)
bool res = true;
vector<string> densities = { "ldpi", "mdpi", "hdpi", "xhdpi", "xxhdpi", "6plus" };
string const densities[] = { "ldpi", "mdpi", "hdpi", "xhdpi", "xxhdpi", "6plus" };
for (size_t s = 0; s < MapStyleCount; ++s)
styles::RunForEveryMapStyle([&](MapStyle mapStyle)
{
MapStyle const mapStyle = static_cast<MapStyle>(s);
if (mapStyle == MapStyleMerged)
continue;
GetStyleReader().SetCurrentStyle(mapStyle);
classificator::Load();
set<string> const drawingRuleSymbols = GetSymbolsSetFromDrawingRule();
for (size_t d = 0; d < densities.size(); ++d)
for (string const & density : densities)
{
set<string> const resourceStyles = GetSymbolsSetFromResourcesFile(densities[d]);
set<string> const resourceStyles = GetSymbolsSetFromResourcesFile(density);
vector<string> missed;
set_difference(drawingRuleSymbols.begin(), drawingRuleSymbols.end(),
@ -94,11 +88,11 @@ UNIT_TEST(Test_SymbolsConsistency)
{
// We are interested in all set of bugs, therefore we do not stop test here but
// continue it just keeping in res that test failed.
LOG(LINFO, ("Symbols mismatch: style", mapStyle, ", density", densities[d], ", missed", missed));
LOG(LINFO, ("Symbols mismatch: style", mapStyle, ", density", density, ", missed", missed));
res = false;
}
}
}
});
TEST(res, ());
}

View file

@ -19,3 +19,6 @@ SOURCES += \
classificator_tests.cpp \
dashes_test.cpp \
style_symbols_consistency_test.cpp \
HEADERS += \
helpers.hpp \

View file

@ -40,6 +40,7 @@ HEADERS += \
search_string_intersection.hpp \
search_trie.hpp \
suggest.hpp \
types_skipper.hpp \
v2/cbv_ptr.hpp \
v2/features_filter.hpp \
v2/features_layer.hpp \
@ -84,6 +85,7 @@ SOURCES += \
search_engine.cpp \
search_query.cpp \
search_query_params.cpp \
types_skipper.cpp \
v2/cbv_ptr.cpp \
v2/features_filter.cpp \
v2/features_layer.cpp \

View file

@ -0,0 +1,75 @@
#include "testing/testing.hpp"
#include "search/search_tests_support/test_mwm_builder.hpp"
#include "generator/feature_builder.hpp"
#include "generator/osm_element.hpp"
#include "generator/osm2type.hpp"
#include "indexer/classificator.hpp"
#include "indexer/feature_data.hpp"
#include "indexer/feature.hpp"
#include "indexer/index.hpp"
#include "platform/local_country_file.hpp"
namespace
{
using TBuilder = search::tests_support::TestMwmBuilder;
void MakeFeature(TBuilder & builder, pair<string, string> const & tag, m2::PointD const & pt)
{
OsmElement e;
e.AddTag(tag.first, tag.second);
FeatureParams params;
ftype::GetNameAndType(&e, params);
params.AddName("en", "xxx");
FeatureBuilder1 fb;
fb.SetParams(params);
fb.SetCenter(pt);
TEST(builder.Add(fb), (fb));
}
}
UNIT_TEST(Generate_DeprecatedTypes)
{
auto file = platform::LocalCountryFile::MakeForTesting("testCountry");
TBuilder builder(file, feature::DataHeader::country);
// Deprecated types.
MakeFeature(builder, {"office", "travel_agent"}, {0, 0});
MakeFeature(builder, {"shop", "tailor"}, {1, 1});
MakeFeature(builder, {"shop", "estate_agent"}, {2, 2});
builder.Finish();
Index index;
TEST_EQUAL(index.Register(file).second, MwmSet::RegResult::Success, ());
// New types.
StringIL arr[] = {{"shop"}, {"office"}};
Classificator const & cl = classif();
set<uint32_t> types;
for (auto const & s : arr)
types.insert(cl.GetTypeByPath(s));
int count = 0;
auto const fn = [&](FeatureType & ft)
{
++count;
ft.ForEachType([&](uint32_t t)
{
TEST(types.count(t) > 0, (cl.GetReadableObjectName(t)));
});
};
index.ForEachInScale(fn, scales::GetUpperScale());
TEST_EQUAL(count, 3, ());
file.DeleteFromDisk(MapOptions::Map);
}

View file

@ -24,6 +24,7 @@ SOURCES += \
helpers.cpp \
search_query_v2_test.cpp \
smoke_test.cpp \
generate_tests.cpp \
HEADERS += \
helpers.hpp \

View file

@ -1,4 +1,4 @@
#include "indexer/types_skipper.hpp"
#include "types_skipper.hpp"
#include "indexer/classificator.hpp"
#include "indexer/feature_data.hpp"
@ -18,12 +18,11 @@ TypesSkipper::TypesSkipper()
for (auto const & e : (StringIL[]){{"building", "address"}})
m_skipAlways[1].push_back(c.GetTypeByPath(e));
for (auto const & e : (StringIL[]){{"highway", "bus_stop"}, {"highway", "speed_camera"}})
m_dontSkipIfEmptyName.push_back(c.GetTypeByPath(e));
for (auto const & e :
(StringIL[]){{"building"}, {"highway"}, {"natural"}, {"waterway"}, {"landuse"}})
for (auto const & e : (StringIL[]){{"building"}, {"highway"}, {"natural"},
{"waterway"}, {"landuse"}})
{
m_skipIfEmptyName[0].push_back(c.GetTypeByPath(e));
}
for (auto const & e : (StringIL[]){{"place", "country"},
{"place", "state"},
@ -62,10 +61,10 @@ void TypesSkipper::SkipEmptyNameTypes(feature::TypesHolder & types) const
{
auto shouldBeRemoved = [this](uint32_t type)
{
ftype::TruncValue(type, 2);
if (HasType(m_dontSkipIfEmptyName, type))
if (m_dontSkipIfEmptyName.IsMatched(type))
return false;
ftype::TruncValue(type, 2);
if (HasType(m_skipIfEmptyName[1], type))
return true;

View file

@ -1,11 +1,8 @@
#pragma once
#include "base/buffer_vector.hpp"
#include "v2/search_model.hpp"
namespace feature
{
class TypesHolder;
}
#include "base/buffer_vector.hpp"
namespace search
{
@ -34,7 +31,7 @@ private:
// m_skipIfEmptyName and m_dontSkipIfEmptyName are used in the case 2 described above.
TCont m_skipIfEmptyName[2];
TCont m_dontSkipIfEmptyName;
v2::TwoLevelPOIChecker m_dontSkipIfEmptyName;
uint32_t m_country, m_state;
};

View file

@ -2,7 +2,6 @@
#include "indexer/classificator.hpp"
#include "indexer/feature.hpp"
#include "indexer/ftypes_matcher.hpp"
#include "base/macros.hpp"
@ -12,9 +11,24 @@ namespace search
{
namespace v2
{
/// This checkers should be similar with ftypes::IsAddressObjectChecker, plus public transort.
TwoLevelPOIChecker::TwoLevelPOIChecker() : ftypes::BaseChecker(2 /* level */)
{
Classificator const & c = classif();
StringIL arr[] = {
{"highway", "bus_stop"},
{"highway", "speed_camera"},
{"waterway", "waterfall"},
{"natural", "volcano"},
{"natural", "cave_entrance"}
};
for (size_t i = 0; i < ARRAY_SIZE(arr); ++i)
m_types.push_back(c.GetTypeByPath(arr[i]));
}
namespace
{
/// Should be similar with ftypes::IsAddressObjectChecker object classes.
class OneLevelPOIChecker : public ftypes::BaseChecker
{
public:
@ -28,16 +42,6 @@ public:
}
};
class TwoLevelPOIChecker : public ftypes::BaseChecker
{
public:
TwoLevelPOIChecker() : ftypes::BaseChecker(2 /* level */)
{
Classificator const & c = classif();
m_types.push_back(c.GetTypeByPath({"highway", "bus_stop"}));
}
};
class IsPoiChecker
{
public:

View file

@ -1,5 +1,7 @@
#pragma once
#include "indexer/ftypes_matcher.hpp"
#include "std/string.hpp"
#include "std/vector.hpp"
@ -7,15 +9,19 @@
class FeatureType;
namespace ftypes
{
class BaseChecker;
}
namespace search
{
namespace v2
{
/// Describes 2-level POI-exception types that don't belong to any POI-common classes
/// (amenity, shop, tourism, ...). Used in search algo and search categories index generation.
class TwoLevelPOIChecker : public ftypes::BaseChecker
{
public:
TwoLevelPOIChecker();
};
// This class is used to map feature types to a restricted set of
// different search classes (do not confuse these classes with search
// categories - they are completely different things).