Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
c92f275750 [styles] Regenerate for outdoors
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2022-06-22 19:02:17 +03:00
415d6457b3 [styles] WIP Outdoors style
Bigger/thicker and/or visible at lower zoom levels features:
- paths/tracks, cliffs
- contour lines
- railways, powerlines and towers
- water sources, peaks, saddles, passes
- waterfalls, lighthouses, caves
- campsites, huts, shelters, picnic sites
- gates, stiles, fords
- etc.

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2022-06-22 18:57:11 +03:00
2ddb4b86fb [indexer] Allow feature visibility override
- read 3 extra scale indices
- fallback to a nearest geometry if requested one doesn't exist

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2022-06-21 20:21:44 +03:00
18 changed files with 15874 additions and 6417 deletions

View file

@ -182,6 +182,7 @@
8440772
8505220
8550167
8815990
8916559
8947848
9163744
@ -190,7 +191,6 @@
9404166
9682745
9718290
9868678
9868950
10066329
10167040
@ -332,7 +332,9 @@
862348902
863203947
863664762
863850275
864585864
864835622
865871792
868862139
869585866
@ -344,6 +346,7 @@
1292174597
1292964096
1293171732
1295201075
1295418140
1295727419
1296319556
@ -351,6 +354,7 @@
1297438037
1298359132
1300057891
1300661622
1300793480
1301043238
1304608947
@ -367,6 +371,7 @@
1712394496
1712602132
1714039338
1714631475
1714848540
1716085065
1716209219
@ -374,6 +379,7 @@
1717328977
1719302778
1719488291
1720092022
1720473638
1724500155
1724896680

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.

File diff suppressed because it is too large Load diff

View file

@ -24,6 +24,7 @@
8.0 3.0
10.0 3.5
3.5 2.0
4.0 2.5
2.0 2.0
2.0 1.0
3.6 1.6
@ -32,16 +33,15 @@
7.0 3.0
16.2 8.1
5.0 5.0
4.0 2.5
6.0 3.5
8.0 4.5
8.0 4.0
12.0 5.0
1.5 1.5
1.8 1.8
2.5 2.5
3.2 3.2
4.0 4.0
9.0 3.5
12.0 3.5
12.0 4.0
17.0 5.0
4.0 2.0 2.0 1.5
6.0 3.0 3.0 2.0
8.0 4.0 4.0 3.0
@ -51,10 +51,12 @@
3.5 5.0 6.0 1.4
4.0 6.0 8.0 1.5
5.0 7.0 10.0 1.9
6.0 8.5 12.0 2.3
6.3 6.3
1.8 5.4
4.5 4.5
8.1 8.1
6.0 6.0
8.0 8.0
10.0 10.0
2.7 2.7
4.95 4.95
2.0 1.35
@ -62,6 +64,8 @@
3.3 1.8
4.0 1.8
6.3 2.7
4.5 4.5
8.1 8.1
10.1 10.1
1.0 12.0
1.15 14.0

View file

@ -737,25 +737,36 @@ line|z19-[historic=citywalls],
{width: 11; dashes: 8,8,3,8;}
line|z14-[natural=cliff],
line|z14-[natural=earth_bank],
{color: @cliff; width: 2; dashes: 1.4,1.4; opacity: 0.6;}
line|z13-[natural=cliff],
line|z13-[natural=earth_bank],
{color: @cliff; width: 2; dashes: 1.4,1.4; opacity: 0.7;}
line|z14[natural=cliff],
line|z14[natural=earth_bank],
{width: 3; dashes: 1.5,1.5; opacity: 0.7;}
line|z15[natural=cliff],
line|z15[natural=earth_bank],
{width: 3; dashes: 1.5,1.5; opacity: 0.6;}
{width: 6.2; dashes: 3,3.5,4.5,1.2; opacity: 0.7;}
line|z16[natural=cliff],
line|z16[natural=earth_bank],
{width: 6.2; dashes: 3,3.5,4.5,1.2; opacity: 0.6;}
{width: 7.4; dashes: 3.5,5,6,1.4; opacity: 0.7;}
line|z17[natural=cliff],
line|z17[natural=earth_bank],
{width: 7.4; dashes: 3.5,5,6,1.4; opacity: 0.6;}
{width: 9.5; dashes: 4,6,8,1.5; opacity: 0.8;}
line|z18[natural=cliff],
line|z18[natural=earth_bank],
{width: 9.5; dashes: 4,6,8,1.5; opacity: 0.7;}
{width: 11.9; dashes: 5,7,10,1.9; opacity: 0.8;}
line|z19-[natural=cliff],
line|z19-[natural=earth_bank],
{width: 11.9; dashes: 5,7,10,1.9; opacity: 0.7;}
{width: 14.3; dashes: 6,8.5,12,2.3; opacity: 0.8;}
/*
line|z18[natural=cliff],
line|z18[natural=earth_bank],
{width: 17.3; dashes: 7,10,14.5,2.8; opacity: 0.7;}
line|z19-[natural=cliff],
line|z19-[natural=earth_bank],
{width: 19.5; dashes: 8,12,16,3.5; opacity: 0.7;}
*/
line|z16-[barrier=retaining_wall],
{color: @fence; width: 2.4; dashes: 2.8,1.4,1.4,1; opacity: 1;}
@ -779,24 +790,24 @@ line|z19-[man_made=embankment],
/* 9. ISOLINES */
line|z11-[isoline=step_1000],
line|z10-[isoline=step_1000],
{color: @isoline1000;}
line|z11-[isoline=step_500],
line|z10-[isoline=step_500],
{color: @isoline500;}
line|z13-[isoline=step_100],
line|z12-[isoline=step_100],
{color: @isoline100;}
line|z15-[isoline=step_50],
line|z15-[isoline=zero],
line|z14-[isoline=step_50],
line|z14-[isoline=zero],
{color: @isoline50;}
line|z15-[isoline=step_10],
{color: @isoline10;}
line|z11-[isoline=step_1000],
line|z10-[isoline=step_1000],
{width: 1.3;opacity: 0.8;}
line|z11[isoline=step_500],
line|z10-[isoline=step_500],
{width: 1.0;opacity: 0.5;}
line|z12[isoline=step_500],
@ -804,27 +815,27 @@ line|z12[isoline=step_500],
line|z13-[isoline=step_500],
{width: 1.3;opacity: 0.8;}
line|z13[isoline=step_100],
line|z12[isoline=step_100],
{width: 1.0;opacity: 0.5;}
line|z14[isoline=step_100],
line|z13-14[isoline=step_100],
{width: 1.3;opacity: 0.6;}
line|z15-16[isoline=step_100],
line|z15[isoline=step_100],
{width: 1.3;opacity: 0.8;}
line|z15-16[isoline=step_50],
line|z15-16[isoline=zero],
line|z15-16[isoline=step_10],
line|z14-15[isoline=step_50],
line|z14-15[isoline=zero],
line|z15[isoline=step_10],
{width: 1.0;opacity: 0.5;}
line|z17-[isoline=step_100],
line|z16-[isoline=step_100],
{width: 1.3;opacity: 0.8;}
line|z17[isoline=step_50],
line|z17[isoline=zero],
line|z17[isoline=step_10],
line|z16[isoline=step_50],
line|z16[isoline=zero],
line|z16[isoline=step_10],
{width: 1.0;opacity: 0.6;}
line|z18-[isoline=step_50],
line|z18-[isoline=zero],
line|z18-[isoline=step_10],
line|z17-[isoline=step_50],
line|z17-[isoline=zero],
line|z17-[isoline=step_10],
{width: 1.3;opacity: 0.8;}

View file

@ -749,18 +749,18 @@ area|z17-[public_transport=platform],
line[isoline]
{text-position: line;}
line|z11-[isoline=step_1000],
line|z10-[isoline=step_1000],
{text:name;font-size: 9;fill-opacity: 0.7;text-color: @label_isoline1000;}
line|z12-[isoline=step_500],
line|z11-[isoline=step_500],
{text:name;font-size: 9;fill-opacity: 0.7;text-color: @label_isoline500;}
line|z15-[isoline=step_100],
line|z13-[isoline=step_100],
{text:name;font-size: 9;fill-opacity: 0.7;text-color: @label_isoline100;}
line|z17-[isoline=step_50],
line|z17-[isoline=zero],
line|z15-[isoline=step_50],
line|z15-[isoline=zero],
{text:name;font-size: 9;fill-opacity: 0.7;text-color: @label_isoline50;}
line|z17-[isoline=step_10],
line|z16-[isoline=step_10],
{text:name;font-size: 9;fill-opacity: 0.7;text-color: @label_isoline10;}

View file

@ -469,25 +469,25 @@ area[building=train_station],
node|z10-[natural=volcano],
area|z10-[natural=volcano],
node|z11-[natural=cave_entrance],
area|z11-[natural=cave_entrance],
node|z11-[waterway=waterfall],
area|z11-[waterway=waterfall],
node|z13-[natural=peak],
area|z13-[natural=peak],
node|z14-[natural=saddle],
area|z14-[natural=saddle],
node|z14-[mountain_pass],
area|z14-[mountain_pass],
node|z14-[natural=spring],
area|z14-[natural=spring],
node|z14-[natural=hot_spring],
area|z14-[natural=hot_spring],
node|z14-[natural=geyser],
area|z14-[natural=geyser],
node|z16-[natural=beach],
area|z16-[natural=beach],
area|z14-[natural=bare_rock],
node|z10-[natural=cave_entrance],
area|z10-[natural=cave_entrance],
node|z10-[waterway=waterfall],
area|z10-[waterway=waterfall],
node|z10-[natural=peak],
area|z10-[natural=peak],
node|z11-[natural=saddle],
area|z11-[natural=saddle],
node|z11-[mountain_pass],
area|z11-[mountain_pass],
node|z11-[natural=spring],
area|z11-[natural=spring],
node|z12-[natural=hot_spring],
area|z12-[natural=hot_spring],
node|z12-[natural=geyser],
area|z12-[natural=geyser],
node|z14-[natural=beach],
area|z14-[natural=beach],
area|z12-[natural=bare_rock],
{text: name;text-color: @poi_label;text-position: center;text-offset: 1;text-optional: true;}
node|z12-[boundary=national_park],
@ -506,50 +506,50 @@ node|z18-[leisure=nature_reserve],
area|z18-[leisure=nature_reserve]
{text-optional: true;}
node|z11[natural=cave_entrance],
area|z11[natural=cave_entrance]
node|z10-11[natural=cave_entrance],
area|z1011[natural=cave_entrance]
{icon-image: cave-s.svg;icon-min-distance: 20;text-optional: true;}
node|z12-[natural=cave_entrance],
area|z12-[natural=cave_entrance]
{icon-image: cave-s.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z15-[natural=cave_entrance],
area|z15-[natural=cave_entrance]
node|z14-[natural=cave_entrance],
area|z14-[natural=cave_entrance]
{icon-image: cave-m.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z17-[natural=cave_entrance],
area|z17-[natural=cave_entrance]
{icon-image: cave-m.svg;text-offset: 1;font-size: 11;text-optional: true;}
node|z11[waterway=waterfall],
area|z11[waterway=waterfall]
node|z10-11[waterway=waterfall],
area|z10-11[waterway=waterfall]
{icon-image: waterfall-s.svg;icon-min-distance: 15;text-optional: true;}
node|z12-[waterway=waterfall],
area|z12-[waterway=waterfall]
{icon-image: waterfall-s.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z17-[waterway=waterfall],
area|z17-[waterway=waterfall]
node|z15-[waterway=waterfall],
area|z15-[waterway=waterfall]
{icon-image: waterfall-m.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z10-[natural=volcano],
area|z10-[natural=volcano]
{icon-image: volcano-s.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z15-[natural=volcano],
area|z15-[natural=volcano]
node|z14-[natural=volcano],
area|z14-[natural=volcano]
{icon-image: volcano-m.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z12[natural=peak][name],
area|z12[natural=peak][name]
node|z10-12[natural=peak][name],
area|z10-12[natural=peak][name]
{icon-image: peakt-s.svg;icon-min-distance: 10;text-offset: 1;text: name;text-color: @poi_label;text-position: center;text-optional: true;}
node|z12-14[natural=peak][!name],
node|z12-14[natural=rock][!name],
area|z12-14[natural=peak][!name],
area|z12-14[natural=rock][!name]
node|z10-14[natural=peak][!name],
node|z12-14[natural=bare_rock][!name],
area|z10-14[natural=peak][!name],
area|z12-14[natural=bare_rock][!name]
{font-size: 0;}
node|z13[natural=peak][name],
area|z13[natural=peak][name]
node|z12-13[natural=peak][name],
area|z12-13[natural=peak][name]
{icon-image: peakt-s.svg;text-offset: 1;font-size: 9;text-optional: true;}
node|z14[natural=peak][name],
area|z14[natural=peak][name]
{icon-image: peakt-s.svg;text-offset: 1;font-size: 10;text-optional: true;}
{icon-image: peakt-m.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z15-[natural=peak],
node|z15-[natural=rock],
area|z15-[natural=peak],
@ -557,11 +557,16 @@ area|z15-[natural=rock]
{icon-image: peakt-m.svg;text-offset: 1;font-size: 10;text-optional: true;}
/* ToDo: Make the same as natural=peak when we will have -s,-m icons */
node|z14-[natural=saddle],
area|z14-[natural=saddle],
node|z14-[mountain_pass],
area|z14-[mountain_pass],
{icon-image: mountain-pass.svg;text-offset: 1;font-size: 10;text-optional: true;}
node|z11-[natural=saddle],
area|z11-[natural=saddle],
node|z11-[mountain_pass],
area|z11-[mountain_pass],
{icon-image: mountain-pass.svg;}
node|z13-[natural=saddle],
area|z13-[natural=saddle],
node|z13-[mountain_pass],
area|z13-[mountain_pass],
{text-offset: 1;font-size: 10;text-optional: true;}
node|z16[leisure=beach_resort],
area|z16[leisure=beach_resort]
@ -616,10 +621,10 @@ node|z12-[landuse=forest][!name],
area|z12-[landuse=forest][!name]
{}
node|z14[natural=spring],
area|z14[natural=spring],
node|z14[natural=hot_spring],
area|z14[natural=hot_spring]
node|z11-14[natural=spring],
area|z11-14[natural=spring],
node|z12-14[natural=hot_spring],
area|z12-14[natural=hot_spring]
{icon-image: drinking-water-s.svg;text-offset:6;font-size: 10;icon-min-distance: 24;text-optional: true;}
node|z15-[natural=spring],
area|z15-[natural=spring],
@ -627,13 +632,22 @@ node|z15-[natural=hot_spring],
area|z15-[natural=hot_spring]
{icon-image: drinking-water-m.svg;text-offset:8;font-size: 10;icon-min-distance: 24;text-optional: true;}
node|z14[natural=geyser],
area|z14[natural=geyser]
node|z10-12[natural=geyser],
area|z10-12[natural=geyser]
{icon-image: geyser-s.svg;text-offset:6;font-size: 10;icon-min-distance: 24;text-optional: true;}
node|z15-[natural=geyser],
area|z15-[natural=geyser]
node|z13-[natural=geyser],
area|z13-[natural=geyser]
{icon-image: geyser-m.svg;text-offset:8;font-size: 10;icon-min-distance: 24;text-optional: true;}
node|z12-[amenity=water_point],
area|z12-[amenity=water_point],
node|z12-[amenity=drinking_water],
area|z12-[amenity=drinking_water],
node|z12-[man_made=water_tap],
area|z12-[man_made=water_tap],
node|z12-[man_made=water_well],
area|z12-[man_made=water_well],
{icon-image: drinking-water-s.svg;icon-min-distance: 36;text-optional: true;}
node|z15-[amenity=water_point],
area|z15-[amenity=water_point],
node|z15-[amenity=drinking_water],
@ -642,15 +656,6 @@ node|z15-[man_made=water_tap],
area|z15-[man_made=water_tap],
node|z15-[man_made=water_well],
area|z15-[man_made=water_well],
{icon-image: drinking-water-s.svg;icon-min-distance: 36;text-optional: true;}
node|z19-[amenity=water_point],
area|z19-[amenity=water_point],
node|z19-[amenity=drinking_water],
area|z19-[amenity=drinking_water],
node|z19-[man_made=water_tap],
area|z19-[man_made=water_tap],
node|z19-[man_made=water_well],
area|z19-[man_made=water_well],
{icon-image: drinking-water-m.svg;icon-min-distance: 36;text-optional: true;}
/* 3. TRANSPORT */
@ -1171,12 +1176,12 @@ node|z16-[tourism=hotel],
node|z16-[tourism=hostel],
node|z16-[tourism=guest_house],
area|z16-[tourism=guest_house],
node|z16-[tourism=alpine_hut],
area|z16-[tourism=alpine_hut],
node|z16-[tourism=wilderness_hut],
area|z16-[tourism=wilderness_hut],
node|z16-[tourism=chalet],
area|z16-[tourism=chalet],
node|z13-[tourism=alpine_hut],
area|z13-[tourism=alpine_hut],
node|z13-[tourism=wilderness_hut],
area|z13-[tourism=wilderness_hut],
node|z15-[tourism=chalet],
area|z15-[tourism=chalet],
node|z16-[tourism=resort],
area|z16-[tourism=resort],
node|z16-[tourism=motel],
@ -1184,18 +1189,18 @@ area|z16-[tourism=motel],
node|z16-[tourism=apartment],
area|z16-[tourism=apartment]
{text: name;text-offset: 1;font-size: 10;text-color: @poi_label;}
node|z15-[tourism=camp_site],
area|z15-[tourism=camp_site],
node|z16-[tourism=picnic_site],
area|z16-[tourism=picnic_site],
node|z16-[leisure=picnic_table],
area|z16-[leisure=picnic_table],
node|z16-[amenity=shelter],
area|z16-[amenity=shelter],
node|z14-[tourism=camp_site],
area|z14-[tourism=camp_site],
node|z14-[tourism=picnic_site],
area|z14-[tourism=picnic_site],
node|z15-[leisure=picnic_table],
area|z15-[leisure=picnic_table],
node|z13-[amenity=shelter],
area|z13-[amenity=shelter],
node|z16-[highway=rest_area],
area|z16-[highway=rest_area],
node|z16-[tourism=caravan_site],
area|z16-[tourism=caravan_site]
node|z15-[tourism=caravan_site],
area|z15-[tourism=caravan_site]
{text: name;text-color: @poi_label;text-offset: 1;font-size: 10;}
@ -1212,12 +1217,12 @@ area|z16[tourism=guest_house],
node|z16[tourism=apartment],
area|z16[tourism=apartment]
{icon-image: apartment-m.svg;icon-min-distance: 24;text-halo-radius: 0;}
node|z16[tourism=alpine_hut],
area|z16[tourism=alpine_hut],
node|z16[tourism=wilderness_hut],
area|z16[tourism=wilderness_hut],
node|z16[tourism=chalet],
area|z16[tourism=chalet]
node|z13-16[tourism=alpine_hut],
area|z13-16[tourism=alpine_hut],
node|z13-16[tourism=wilderness_hut],
area|z13-16[tourism=wilderness_hut],
node|z15-16[tourism=chalet],
area|z15-16[tourism=chalet]
{icon-image: alpine_hut-m.svg;icon-min-distance: 24;}
node|z17-[tourism=hotel],
@ -1233,12 +1238,12 @@ area|z17[tourism=guest_house],
node|z17[tourism=apartment],
area|z17[tourism=apartment]
{icon-image: apartment-m.svg;text-halo-radius: 0;}
node|z17-[tourism=alpine_hut],
area|z17-[tourism=alpine_hut],
node|z17-[tourism=wilderness_hut],
area|z17-[tourism=wilderness_hut],
node|z17-[tourism=chalet],
area|z17-[tourism=chalet]
node|z15-[tourism=alpine_hut],
area|z15-[tourism=alpine_hut],
node|z15-[tourism=wilderness_hut],
area|z15-[tourism=wilderness_hut],
node|z16-[tourism=chalet],
area|z16-[tourism=chalet]
{icon-image: alpine_hut-m.svg;icon-min-distance: 16;}
node|z18-[tourism=guest_house],
@ -1247,25 +1252,25 @@ node|z18-[tourism=apartment],
area|z18-[tourism=apartment]
{icon-image: apartment-m.svg;icon-min-distance: 16;}
node|z15-[tourism=camp_site],
area|z15-[tourism=camp_site]
node|z14-[tourism=camp_site],
area|z14-[tourism=camp_site]
{icon-image: campsite-m.svg;icon-min-distance: 12;}
node|z16-[tourism=picnic_site],
area|z16-[tourism=picnic_site],
node|z14-[tourism=picnic_site],
area|z14-[tourism=picnic_site],
node|z16-[highway=rest_area],
area|z16-[highway=rest_area]
{icon-image: picnic-m.svg;icon-min-distance: 10;}
node|z16-[leisure=picnic_table],
area|z16-[leisure=picnic_table]
node|z15-[leisure=picnic_table],
area|z15-[leisure=picnic_table]
{icon-image: picnic_table-m.svg;icon-min-distance: 10;}
node|z16-[amenity=shelter],
area|z16-[amenity=shelter]
node|z13-[amenity=shelter],
area|z13-[amenity=shelter]
{icon-image: shelter-m.svg;icon-min-distance: 10;}
node|z16[tourism=caravan_site],
area|z16[tourism=caravan_site]
node|z15-16[tourism=caravan_site],
area|z15-16[tourism=caravan_site]
{icon-image: caravan_site-m.svg;font-size: 11;icon-min-distance: 30;}
node|z17-[tourism=caravan_site],
area|z17-[tourism=caravan_site]
@ -1848,11 +1853,11 @@ node|z19-[amenity=fountain],
area|z19-[amenity=fountain]
{icon-image: fountain-m.svg;icon-min-distance: 20;}
node|z14[man_made=lighthouse],
area|z14[man_made=lighthouse]
{icon-image: lighthouse-s.svg;text-offset: 1;icon-min-distance: 5;}
node|z15-[man_made=lighthouse],
area|z15-[man_made=lighthouse]
node|z11-[man_made=lighthouse],
area|z11-[man_made=lighthouse]
{icon-image: lighthouse-s.svg;text-offset: 1;icon-min-distance: 10;}
node|z13-[man_made=lighthouse],
area|z13-[man_made=lighthouse]
{icon-image: lighthouse-m.svg;}
node|z12-14[barrier=toll_booth],
@ -1862,21 +1867,21 @@ node|z15-[barrier=toll_booth],
area|z15-[barrier=toll_booth]
{icon-image: toll_booth-m.svg;icon-min-distance: 8;text-optional: true;}
node|z15-[barrier=border_control]
node|z14-[barrier=border_control]
{icon-image:bcontrol-m.svg;}
line|z16-[barrier=block],
line|z16-[barrier=bollard],
line|z16-[barrier=chain],
line|z16-[barrier=entrance],
line|z16-[barrier=gate],
line|z16-[barrier=stile],
line|z13-[barrier=gate],
line|z13-[barrier=stile],
{icon-image: dot-m.svg;font-size: 11;}
node|z16-[highway=ford],
node|z16-[power=tower],
node|z15-[man_made=flagpole],
node|z16-[man_made=mast],
node|z14-[highway=ford],
node|z14-[power=tower],
node|z12-[man_made=flagpole],
node|z13-[man_made=mast],
{icon-image: dot-m.svg;}
node|z16-[amenity=taxi],

View file

@ -814,13 +814,13 @@ line|z15-[highway=steps][bridge?]::bridgeblack,
line|z16-[highway=road][bridge?]::bridgeblack,
line|z16-[highway=service][bridge?]::bridgeblack
{casing-linecap: butt;casing-color:@bridge_casing;}
line|z14-[highway=track],
line|z11-[highway=track],
line|z14-[highway=raceway],
line|z14-[leisure=track],
{color: @track;opacity: 1;}
line|z14-[highway=path],
line|z14-[route=hiking],
line|z14-[highway=footway][sac_scale],
line|z11-[highway=path],
line|z11-[route=hiking],
line|z11-[highway=footway][sac_scale],
{color: @path;opacity: 1;}
line|z14-[highway=bridleway]
{color: @bridleway;opacity: 1;}
@ -927,65 +927,79 @@ line|z19-[highway=proposed]
/* 8.6 Track & Path 14-22 ZOOM */
line|z14[highway=track][tracktype=grade1],
line|z14[highway=raceway],
line|z14[leisure=track]
{width: 1;}
line|z15[highway=track][tracktype=grade1],
line|z15[highway=raceway],
line|z15[leisure=track]
{width: 1.5;}
line|z16[highway=track][tracktype=grade1],
line|z16[highway=raceway],
line|z16[leisure=track]
{width: 1.8;}
line|z17-18[highway=track][tracktype=grade1],
line|z17-18[highway=raceway],
line|z17-18[leisure=track]
{width:3;}
line|z19-[highway=track][tracktype=grade1],
line|z19-[highway=raceway],
line|z19-[leisure=track]
{width:4;}
line|z14[highway=track],
{width: 1.1; dashes: 6,2.5;}
line|z15[highway=track],
{width: 1.4; dashes: 6,2.5;}
line|z16[highway=track],
{width: 1.9; dashes: 7,3;}
line|z17[highway=track],
{width: 2.5; dashes: 7,3;}
line|z18[highway=track],
{width: 3.5; dashes: 9,3.5;}
line|z19-[highway=track],
{width: 4.5; dashes: 12,3.5;}
line|z11[highway=track],
{width: 1.3; dashes: 6,2.5;}
line|z12[highway=track],
{width: 1.6; dashes: 6,2.5;}
line|z13[highway=track],
{width: 2.1; dashes: 7,3;}
line|z14[highway=track],
{width: 2.9; dashes: 7,3;}
line|z15[highway=track],
{width: 4; dashes: 12,4;}
line|z16[highway=track],
{width: 4.9; dashes: 12,4;}
line|z17[highway=track],
{width: 7; dashes: 12,4;}
line|z18[highway=track],
{width: 10; dashes: 17,5;}
line|z19-[highway=track],
{width: 13; dashes: 17,5;}
line|z11[highway=path],
line|z11[route=hiking],
line|z11[highway=footway][sac_scale],
{width: 1; dashes: 3.5,2;}
line|z12[highway=path],
line|z12[route=hiking],
line|z12[highway=footway][sac_scale],
{width: 1.2; dashes: 3.5,2;}
line|z13[highway=path],
line|z13[route=hiking],
line|z13[highway=footway][sac_scale],
{width: 1.5; dashes: 4,2.5;}
line|z14[highway=path],
line|z14[route=hiking],
line|z14[highway=footway][sac_scale],
{width: 0.9; dashes: 3.5,2;}
{width: 2; dashes: 4,2.5;}
line|z15[highway=path],
line|z15[route=hiking],
line|z15[highway=footway][sac_scale],
{width: 1.1; dashes: 3.5,2;}
{width: 2.8; dashes: 8,4;}
line|z16[highway=path],
line|z16[route=hiking],
line|z16[highway=footway][sac_scale],
{width: 1.5; dashes: 4,2.5;}
{width: 4; dashes: 8,4;}
line|z17[highway=path],
line|z17[route=hiking],
line|z17[highway=footway][sac_scale],
{width: 2; dashes: 4,2.5;}
{width: 5.3; dashes: 8,4;}
line|z18[highway=path],
line|z18[route=hiking],
line|z18[highway=footway][sac_scale],
{width: 3; dashes: 6,3.5;}
{width: 7.5; dashes: 12,5;}
line|z19-[highway=path],
line|z19-[route=hiking],
line|z19-[highway=footway][sac_scale],
{width: 4; dashes: 8,4.5;}
{width: 10; dashes: 12,5;}
/* 8.7 Footway 14-22 ZOOM */
@ -1064,7 +1078,7 @@ line|z15-[aeroway=taxiway]
/* 9.RAIL 11-22 ZOOM */
line|z11-[railway=rail],
line|z10-[railway=rail],
line|z11-[railway=yard],
line|z12-[railway=funicular],
line|z13-[railway=light_rail][!tunnel],
@ -1078,10 +1092,10 @@ line|z16-[railway=abandoned],
{color: @railway;opacity:1;}
line|z13-[railway=tram]
{color: @tram;opacity:1;}
line|z16-[railway=rail]::dash,
line|z16-[railway=subway][!tunnel]::dash,
line|z16-[railway=light_rail][!tunnel]::dash,
line|z16-[railway=yard]::dash
line|z14-[railway=rail]::dash,
line|z14-[railway=subway][!tunnel]::dash,
line|z14-[railway=light_rail][!tunnel]::dash,
line|z14-[railway=yard]::dash
{color: @railway_dash;opacity:1;}
line|z14-[railway=rail][bridge?]::bridgewhite,
line|z14-[railway=subway][bridge?]::bridgewhite,
@ -1094,60 +1108,78 @@ line|z14-[railway=light_rail][bridge?]::bridgeblack,
line|z14-[railway=yard][bridge?]::bridgeblack
{casing-linecap: butt;casing-color:@bridge_casing;}
/* 9.1 RAIL 11-22 ZOOM */
/* 9.1 RAIL 10-22 ZOOM */
line|z11-12[railway=rail],
line|z11-12[railway=yard]
{color: @railway_light;width: 0.6;}
line|z10-[railway=rail],
line|z10-[railway=yard],
{color: @railway; width: 2;}
line|z12[railway=rail],
line|z12[railway=yard],
{width: 2.5;}
line|z13-[railway=rail],
line|z13-[railway=subway][!tunnel],
line|z13-[railway=light_rail][!tunnel],
line|z13-[railway=yard]
{color: @railway_light;width: 0.8;}
line|z14[railway=rail],
line|z14[railway=subway][!tunnel],
line|z14[railway=light_rail][!tunnel],
line|z14[railway=yard]
{width: 1;}
{width: 3.2;}
line|z14-[railway=rail],
line|z14-[railway=subway][!tunnel],
line|z14-[railway=light_rail][!tunnel],
line|z14-[railway=yard]
{width: 4.1;}
line|z15[railway=rail],
line|z15[railway=subway][!tunnel],
line|z15[railway=light_rail][!tunnel],
line|z15[railway=yard],
{width: 1.2;}
{width: 5.2;}
line|z16[railway=rail],
line|z16[railway=subway][!tunnel],
line|z16[railway=light_rail][!tunnel],
line|z16[railway=yard]
{width: 2.6;}
line|z17-[railway=rail],
line|z17-[railway=subway][!tunnel],
line|z17-[railway=light_rail][!tunnel],
line|z17-[railway=yard]
{width: 3;}
{width: 6.6;}
line|z17[railway=rail],
line|z17[railway=subway][!tunnel],
line|z17[railway=light_rail][!tunnel],
line|z17[railway=yard]
{width: 9.5;}
line|z18-[railway=rail],
line|z18-[railway=subway][!tunnel],
line|z18-[railway=light_rail][!tunnel],
line|z18-[railway=yard]
{width: 13;}
line|z14[railway=rail]::dash,
line|z14[railway=subway][!tunnel]::dash,
line|z14[railway=light_rail][!tunnel]::dash,
line|z14[railway=yard]::dash,
{width: 3.4; dashes: 5,5;}
line|z15[railway=rail]::dash,
line|z15[railway=subway][!tunnel]::dash,
line|z15[railway=light_rail][!tunnel]::dash,
line|z15[railway=yard]::dash,
{width: 4.2; dashes: 6,6;}
line|z16[railway=rail]::dash,
line|z16[railway=subway][!tunnel]::dash,
line|z16[railway=light_rail][!tunnel]::dash,
line|z16[railway=yard]::dash,
{width: 1.3;dashes: 4.5,4.5;}
{width: 5; dashes: 6,6;}
line|z17[railway=rail]::dash,
line|z17[railway=subway][!tunnel]::dash,
line|z17[railway=light_rail][!tunnel]::dash,
line|z17[railway=yard]::dash
{width: 2;dashes: 6.3,6.3;}
{width: 7.5; dashes: 8,8;}
line|z18-[railway=rail]::dash,
line|z18-[railway=subway][!tunnel]::dash,
line|z18-[railway=light_rail][!tunnel]::dash,
line|z18-[railway=yard]::dash
{width: 2;dashes: 8.1,8.1;}
{width: 10; dashes: 10,10;}
line|z16-[railway=preserved],
line|z16-[railway=abandoned]
{width: 1.6;dashes: 6.3,6.3;}
line|z14-[railway=preserved],
line|z14-[railway=abandoned]
{width: 2; dashes: 6.3,6.3;}
line|z16-[railway=construction],
line|z16-[railway=disused]
{width: 1;dashes: 1.8,5.4;}
line|z14-[railway=construction],
line|z14-[railway=disused]
{width: 1.7; dashes: 1.8,5.4;}
/* 9.2 Rail tunnel 14-22 ZOOM */
@ -1244,17 +1276,20 @@ line|z12-[aerialway=t-bar]::dash,
line|z12-[aerialway=magic_carpet]::dash,
line|z12-[aerialway=platter]::dash,
line|z12-[aerialway=rope_tow]::dash,
line|z18-[power=line],
{color: @aerialway;opacity: 1;}
/* 10.1 Lift 12-22 ZOOM */
line|z15-[power=line],
{color: @railway; width: 1; opacity: 0.6;}
line|z17-[power=line],
{width: 1.3; opacity: 0.7;}
line|z12-14[piste:lift=j-bar],
line|z12-14[piste:lift=magic_carpet],
line|z12-14[piste:lift=platter],
line|z12-14[piste:lift=rope_tow],
line|z12-14[piste:lift=t-bar],
line|z19-[power=line],
{width: 1;}
line|z15-[piste:lift],
line|z15-[piste:lift=j-bar],

View file

@ -423,12 +423,12 @@ line|z18-[highway=road],
line|z15-[highway=cycleway],
line|z15-[highway=construction],
line|z15-[highway=proposed],
line|z15-[highway=track],
line|z15-[highway=path],
line|z13-[highway=track],
line|z13-[highway=path],
line|z15-[highway=bridleway],
line|z15-[highway=footway],
line|z16-[leisure=track],
line|z16-[route=hiking],
line|z13-[route=hiking],
line|z16-[highway=steps],
line|z16-[highway=ford],
line|z16-[highway=raceway],
@ -437,10 +437,11 @@ line|z16-[highway=raceway],
line|z15[highway=construction],
line|z15[highway=proposed],
line|z15[highway=bridleway],
line|z15[highway=path],
line|z13-15[highway=path],
line|z13-15[route=hiking],
line|z15[highway=footway],
line|z15[highway=cycleway],
line|z15[highway=track]
line|z13-15[highway=track],
{font-size: 8;}
line|z16-17[highway=ford],
line|z16-17[highway=cycleway],

View file

@ -140,7 +140,7 @@
/* 5.5 Transport */
@railway_light: #B2B1A2;
@railway: #969586;
@railway: #868576;
@railway_dash: #EEEEEE;
@railway_tunnel: #808080;
@aerialway: #444444;

View file

@ -58,14 +58,20 @@ public:
Points const & GetSourcePoints()
{
// For short lines keep simplifying the previous version to ensure points visibility is consistent.
return !m_current.empty() ? m_current : m_fb.GetOuterGeometry();
}
// Its important AddPoints is called sequentially from upper scales to lower.
void AddPoints(Points const & points, int scaleIndex)
{
if (m_ptsInner && points.size() <= m_maxNumTriangles)
{
// Store small features inline and keep a mask for individual points scale visibility.
if (m_buffer.m_innerPts.empty())
// FIXME: if geometry is added for the most detailed scale 3 only
// then the mask is never updated and left == 0,
// which means the geometry could be used on any scale.
m_buffer.m_innerPts = points;
else
FillInnerPointsMask(points, scaleIndex);

View file

@ -49,6 +49,10 @@ public:
// In case of WorldCoasts we should pass correct scale in ForEachInIntervalAndScale.
auto const lastScale = header.GetLastScale();
// Read 3 additional scale indices to allow visibility changes
// for style designers and for custom style users.
// TODO: add enable/disable flag and always keep disabled for the world map.
scale += 3;
if (scale > lastScale)
scale = lastScale;

View file

@ -345,6 +345,7 @@ void FeatureType::ParseHeader2()
{
ptsCount = bitSource.Read(4);
if (ptsCount == 0)
// A mask of outer geometry present.
ptsMask = bitSource.Read(4);
else
ASSERT_GREATER(ptsCount, 1, ());
@ -363,6 +364,7 @@ void FeatureType::ParseHeader2()
{
if (ptsCount > 0)
{
// Inner geometry.
int const count = ((ptsCount - 2) + 4 - 1) / 4;
ASSERT_LESS(count, 4, ());
@ -378,6 +380,7 @@ void FeatureType::ParseHeader2()
}
else
{
// Outer geometry: first point is stored in the header (coding params).
m_points.emplace_back(serial::LoadPoint(src, cp));
ReadOffsets(*m_loadInfo, src, ptsMask, m_offsets.m_pts);
}
@ -435,8 +438,12 @@ uint32_t FeatureType::ParseGeometry(int scale)
{
ASSERT_EQUAL(count, 1, ());
// outer geometry
int const ind = GetScaleIndex(*m_loadInfo, scale, m_offsets.m_pts);
// Outer geometry.
int ind = GetScaleIndex(*m_loadInfo, scale, m_offsets.m_pts);
// If there is no geometry for the requested scale, fallback to a closest available one.
// TODO: add enable/disable flag and always keep disabled for the world map.
if (ind == -1)
ind = GetScaleIndex(*m_loadInfo, FeatureType::WORST_GEOMETRY, m_offsets.m_pts);
if (ind != -1)
{
ReaderSource<FilesContainerR::TReader> src(m_loadInfo->GetGeometryReader(ind));
@ -451,7 +458,7 @@ uint32_t FeatureType::ParseGeometry(int scale)
}
else
{
// filter inner geometry
// Filter inner geometry.
FeatureType::Points points;
points.reserve(count);
@ -460,11 +467,25 @@ uint32_t FeatureType::ParseGeometry(int scale)
ASSERT_LESS(scaleIndex, m_loadInfo->GetScalesCount(), ());
points.emplace_back(m_points.front());
int minScale = m_loadInfo->GetScalesCount() - 1;
int pointScale = 0;
for (size_t i = 1; i + 1 < count; ++i)
{
// check for point visibility in needed scaleIndex
if (static_cast<int>((m_ptsSimpMask >> (2 * (i - 1))) & 0x3) <= scaleIndex)
// Check for point visibility in needed scaleIndex.
pointScale = static_cast<int>((m_ptsSimpMask >> (2 * (i - 1))) & 0x3);
if (pointScale <= scaleIndex)
points.emplace_back(m_points[i]);
else if (points.size() == 1 && minScale > pointScale)
minScale = pointScale;
}
// Fallback to a closest available geometry.
if (points.size() == 1)
{
for (size_t i = 1; i + 1 < count; ++i)
{
if (static_cast<int>((m_ptsSimpMask >> (2 * (i - 1))) & 0x3) == minScale)
points.emplace_back(m_points[i]);
}
}
points.emplace_back(m_points.back());

View file

@ -47,6 +47,11 @@ public:
m_cellsInBucket.resize(m_bucketsCount);
}
// Every feature should be indexed at most once, namely for the smallest possible scale where
// -- its geometry is non-empty;
// -- it is visible;
// -- it is allowed by the classificator.
// If the feature is invisible at all scales, do not index it.
template <class Feature>
void operator()(Feature & ft, uint32_t index) const
{
@ -56,12 +61,15 @@ public:
// 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.
// TODO: skip index building for scales [0,9] for country files and scales 10+ for the world file.
for (uint32_t bucket = minScaleClassif; bucket < m_bucketsCount; ++bucket)
{
// There is a one-to-one correspondence between buckets and scales.
// This is not immediately obvious and in fact there was an idea to map
// a bucket to a contiguous range of scales.
// todo(@pimenov): We probably should remove scale_index.hpp altogether.
// Check feature's geometry and visibility.
if (!FeatureShouldBeIndexed(ft, static_cast<int>(bucket), bucket == minScaleClassif /* needReset */))
{
continue;
@ -78,11 +86,6 @@ public:
}
private:
// Every feature should be indexed at most once, namely for the smallest possible scale where
// -- its geometry is non-empty;
// -- it is visible;
// -- it is allowed by the classificator.
// If the feature is invisible at all scales, do not index it.
template <class Feature>
bool FeatureShouldBeIndexed(Feature & ft, int scale, bool needReset) const
{
@ -136,9 +139,10 @@ void IndexScales(feature::DataHeader const & header, FeaturesVector const & feat
};
using TDisplacementManager = DisplacementManager<decltype(PushCFT)>;
// Heuristically rearrange and filter single-point features to simplify
// Single-point features are heuristically rearranged and filtered to simplify
// the runtime decision of whether we should draw a feature
// or sacrifice it for the sake of more important ones.
// or sacrifice it for the sake of more important ones ("displacement").
// Lines and areas are not displaceable and are just passed on to the index.
TDisplacementManager manager(PushCFT);
std::vector<uint32_t> featuresInBucket(bucketsCount);
std::vector<uint32_t> cellsInBucket(bucketsCount);