Skip to content

Commit 453648d

Browse files
committed
Complete null-safe tunnel/bridge filters for rail and construction layers
1 parent 5e6d138 commit 453648d

4 files changed

Lines changed: 26 additions & 26 deletions

File tree

historical/historical.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"sources": {
66
"ohm": {
77
"type": "vector",
8-
"tiles": ["https://vtiles.openhistoricalmap.org/maps/ohm/{z}/{x}/{y}.pbf"]
8+
"tiles": ["https://vtiles.ohmstaging.org/maps/ohm/{z}/{x}/{y}.pbf"]
99
},
1010
"ohm_landcover_hillshade": {
1111
"type": "raster",
@@ -18,12 +18,12 @@
1818
},
1919
"ne": {
2020
"type": "vector",
21-
"tiles": ["https://vtiles.openhistoricalmap.org/maps/ne/{z}/{x}/{y}.pbf"]
21+
"tiles": ["https://vtiles.ohmstaging.org/maps/ne/{z}/{x}/{y}.pbf"]
2222
},
2323
"osm_land": {
2424
"type": "vector",
2525
"tiles": [
26-
"https://vtiles.openhistoricalmap.org/maps/osm_land/{z}/{x}/{y}.pbf"
26+
"https://vtiles.ohmstaging.org/maps/osm_land/{z}/{x}/{y}.pbf"
2727
],
2828
"minzoom": 0,
2929
"maxzoom": 22,
@@ -1852,7 +1852,7 @@
18521852
"filter": [
18531853
"all",
18541854
["==", ["get", "type"], "construction"],
1855-
["==", ["get", "bridge"], 0],
1855+
["!=", ["coalesce", ["get", "bridge"], 0], 1],
18561856
["==", ["get", "construction"], "road"]
18571857
],
18581858
"layout": {
@@ -1883,7 +1883,7 @@
18831883
"filter": [
18841884
"all",
18851885
["==", ["get", "type"], "construction"],
1886-
["==", ["get", "bridge"], 0],
1886+
["!=", ["coalesce", ["get", "bridge"], 0], 1],
18871887
[
18881888
"in",
18891889
["get", "construction"],
@@ -4110,7 +4110,7 @@
41104110
"all",
41114111
["in", ["get", "type"], ["literal", ["miniature", "narrow_gauge"]]],
41124112
["!", ["in", ["get", "service"], ["literal", ["siding", "yard"]]]],
4113-
["==", ["get", "tunnel"], 0]
4113+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
41144114
],
41154115
"layout": {"visibility": "visible"},
41164116
"paint": {
@@ -4219,7 +4219,7 @@
42194219
["literal", ["abandoned", "dismantled", "disused", "razed"]]
42204220
],
42214221
["!", ["in", ["get", "service"], ["literal", ["siding", "yard"]]]],
4222-
["==", ["get", "tunnel"], 0]
4222+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
42234223
],
42244224
"layout": {"visibility": "visible"},
42254225
"paint": {
@@ -4303,7 +4303,7 @@
43034303
],
43044304
["!", ["in", ["get", "service"], ["literal", ["siding", "yard"]]]],
43054305
["==", ["get", "usage"], "main"],
4306-
["==", ["get", "tunnel"], 0]
4306+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
43074307
],
43084308
"layout": {
43094309
"visibility": "visible",
@@ -4436,7 +4436,7 @@
44364436
],
44374437
["!", ["in", ["get", "service"], ["literal", ["siding", "yard"]]]],
44384438
["!=", ["get", "usage"], "main"],
4439-
["==", ["get", "tunnel"], 0]
4439+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
44404440
],
44414441
"layout": {
44424442
"visibility": "visible",
@@ -4472,7 +4472,7 @@
44724472
],
44734473
["!", ["in", ["get", "service"], ["literal", ["siding", "yard"]]]],
44744474
["==", ["get", "usage"], "main"],
4475-
["==", ["get", "tunnel"], 0]
4475+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
44764476
],
44774477
"layout": {
44784478
"visibility": "visible",
@@ -4580,7 +4580,7 @@
45804580
],
45814581
["!", ["in", ["get", "service"], ["literal", ["siding", "yard"]]]],
45824582
["!=", ["get", "usage"], "main"],
4583-
["==", ["get", "tunnel"], 0]
4583+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
45844584
],
45854585
"layout": {
45864586
"visibility": "visible",

japanese_scroll/japanese_scroll.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@
10061006
["get", "type"],
10071007
["literal", ["residential", "service", "unclassified"]]
10081008
],
1009-
["==", ["get", "bridge"], 0]
1009+
["!=", ["coalesce", ["get", "bridge"], 0], 1]
10101010
],
10111011
"layout": {
10121012
"visibility": "none",

railway/railway.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@
16191619
"filter": [
16201620
"all",
16211621
["in", ["get", "type"], ["literal", ["construction"]]],
1622-
["==", ["get", "bridge"], 0],
1622+
["!=", ["coalesce", ["get", "bridge"], 0], 1],
16231623
["in", ["get", "construction"], ["literal", ["road"]]]
16241624
],
16251625
"layout": {
@@ -1650,7 +1650,7 @@
16501650
"filter": [
16511651
"all",
16521652
["in", ["get", "type"], ["literal", ["construction"]]],
1653-
["==", ["get", "bridge"], 0],
1653+
["!=", ["coalesce", ["get", "bridge"], 0], 1],
16541654
[
16551655
"in",
16561656
["get", "construction"],
@@ -4593,7 +4593,7 @@
45934593
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
45944594
],
45954595
["in", ["get", "type"], ["literal", ["preserved", "rail"]]],
4596-
["==", ["get", "tunnel"], 0]
4596+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
45974597
],
45984598
"layout": {
45994599
"visibility": "visible",
@@ -4615,7 +4615,7 @@
46154615
"filter": [
46164616
"all",
46174617
["==", ["get", "usage"], "main"],
4618-
["==", ["get", "tunnel"], 0],
4618+
["!=", ["coalesce", ["get", "tunnel"], 0], 1],
46194619
["in", ["get", "type"], ["literal", ["preserved", "rail"]]],
46204620
[
46214621
"!",
@@ -4755,7 +4755,7 @@
47554755
],
47564756
["!", ["in", ["get", "service"], ["literal", ["siding", "yard"]]]],
47574757
["==", ["get", "service"], "spur"],
4758-
["==", ["get", "tunnel"], 0]
4758+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
47594759
],
47604760
"layout": {
47614761
"visibility": "visible",
@@ -4797,7 +4797,7 @@
47974797
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
47984798
],
47994799
["==", ["get", "usage"], "tourism"],
4800-
["==", ["get", "tunnel"], 0]
4800+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
48014801
],
48024802
"layout": {
48034803
"visibility": "visible",
@@ -4834,7 +4834,7 @@
48344834
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
48354835
],
48364836
["==", ["get", "usage"], "tourism"],
4837-
["==", ["get", "tunnel"], 0]
4837+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
48384838
],
48394839
"layout": {
48404840
"visibility": "visible",
@@ -4880,7 +4880,7 @@
48804880
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
48814881
],
48824882
["==", ["get", "usage"], "military"],
4883-
["==", ["get", "tunnel"], 0]
4883+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
48844884
],
48854885
"layout": {
48864886
"visibility": "visible",
@@ -4917,7 +4917,7 @@
49174917
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
49184918
],
49194919
["==", ["get", "usage"], "military"],
4920-
["==", ["get", "tunnel"], 0]
4920+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
49214921
],
49224922
"layout": {
49234923
"visibility": "visible",
@@ -4963,7 +4963,7 @@
49634963
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
49644964
],
49654965
["==", ["get", "usage"], "branch"],
4966-
["==", ["get", "tunnel"], 0]
4966+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
49674967
],
49684968
"layout": {
49694969
"visibility": "visible",
@@ -4990,7 +4990,7 @@
49904990
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
49914991
],
49924992
["==", ["get", "usage"], "branch"],
4993-
["==", ["get", "tunnel"], 0]
4993+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
49944994
],
49954995
"layout": {
49964996
"visibility": "visible",
@@ -5036,7 +5036,7 @@
50365036
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
50375037
],
50385038
["==", ["get", "usage"], "industrial"],
5039-
["==", ["get", "tunnel"], 0]
5039+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
50405040
],
50415041
"layout": {
50425042
"visibility": "visible",
@@ -5073,7 +5073,7 @@
50735073
["in", ["get", "service"], ["literal", ["siding", "spur", "yard"]]]
50745074
],
50755075
["==", ["get", "usage"], "industrial"],
5076-
["==", ["get", "tunnel"], 0]
5076+
["!=", ["coalesce", ["get", "tunnel"], 0], 1]
50775077
],
50785078
"layout": {
50795079
"visibility": "visible",

woodblock/woodblock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@
10071007
["get", "type"],
10081008
["literal", ["residential", "service", "unclassified"]]
10091009
],
1010-
["==", ["get", "bridge"], 0]
1010+
["!=", ["coalesce", ["get", "bridge"], 0], 1]
10111011
],
10121012
"layout": {
10131013
"visibility": "none",

0 commit comments

Comments
 (0)