Skip to content

Commit 3e4afd9

Browse files
committed
Enlarge Stapleford boundary, and add more of Bristol. [rebuild] [release]
Dance around maxspeed=0 errors too (fixed upstream in https://www.openstreetmap.org/changeset/126591589)
1 parent f9ab860 commit 3e4afd9

4 files changed

Lines changed: 89 additions & 129 deletions

File tree

data/MANIFEST.json

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,11 @@
460460
"uncompressed_size_bytes": 20006535,
461461
"compressed_size_bytes": 5820190
462462
},
463+
"data/input/gb/bristol/raw_maps/huge.bin": {
464+
"checksum": "6f373c2eb85b8de2fc27056bd0f52524",
465+
"uncompressed_size_bytes": 82201210,
466+
"compressed_size_bytes": 25842958
467+
},
463468
"data/input/gb/burnley/osm/lancashire-latest.osm.pbf": {
464469
"checksum": "6a7520bfa839e28a147b020cc0b59bb1",
465470
"uncompressed_size_bytes": 35851949,
@@ -1171,9 +1176,9 @@
11711176
"compressed_size_bytes": 36319627
11721177
},
11731178
"data/input/gb/nottingham/raw_maps/stapleford.bin": {
1174-
"checksum": "9effb7bda1448ac8487a90c113dab9d0",
1175-
"uncompressed_size_bytes": 6156175,
1176-
"compressed_size_bytes": 1542056
1179+
"checksum": "d2335f52cdba2a6efc88cf6409d4c05c",
1180+
"uncompressed_size_bytes": 11887730,
1181+
"compressed_size_bytes": 3177125
11771182
},
11781183
"data/input/gb/oxford/osm/oxfordshire-latest.osm.pbf": {
11791184
"checksum": "5b8b146ec36f7743def6e9051b1dc72e",
@@ -2540,6 +2545,11 @@
25402545
"uncompressed_size_bytes": 31598067,
25412546
"compressed_size_bytes": 12272492
25422547
},
2548+
"data/system/gb/bristol/maps/huge.bin": {
2549+
"checksum": "c2bd09ceb13d2689328eb316b4f4070a",
2550+
"uncompressed_size_bytes": 139721750,
2551+
"compressed_size_bytes": 55935122
2552+
},
25432553
"data/system/gb/bristol/scenarios/east/background.bin": {
25442554
"checksum": "323e36f6cf2bddb73897280d3d8a0a13",
25452555
"uncompressed_size_bytes": 8547370,
@@ -3696,9 +3706,9 @@
36963706
"compressed_size_bytes": 74432005
36973707
},
36983708
"data/system/gb/nottingham/maps/stapleford.bin": {
3699-
"checksum": "b2d702e522f54e7ad86dd833c377bbfd",
3700-
"uncompressed_size_bytes": 7127105,
3701-
"compressed_size_bytes": 2706683
3709+
"checksum": "88375319bf0ee9896fc1629b3093705c",
3710+
"uncompressed_size_bytes": 14676251,
3711+
"compressed_size_bytes": 5576803
37023712
},
37033713
"data/system/gb/nottingham/scenarios/center/background.bin": {
37043714
"checksum": "15d01a3d28db4c02954dad26c04eb103",
@@ -3711,9 +3721,9 @@
37113721
"compressed_size_bytes": 5896052
37123722
},
37133723
"data/system/gb/nottingham/scenarios/stapleford/background.bin": {
3714-
"checksum": "4913b92b0df1e0022b75a0b986b91e77",
3715-
"uncompressed_size_bytes": 2772286,
3716-
"compressed_size_bytes": 594768
3724+
"checksum": "69e23708ec26dbb2914bc64b5d56432d",
3725+
"uncompressed_size_bytes": 4256476,
3726+
"compressed_size_bytes": 1068103
37173727
},
37183728
"data/system/gb/oxford/maps/center.bin": {
37193729
"checksum": "b1075cef219af51afc401bbddca8b6d2",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"type": "FeatureCollection",
3+
"features": [
4+
{
5+
"type": "Feature",
6+
"properties": {},
7+
"geometry": {
8+
"coordinates": [
9+
[
10+
[
11+
-2.67498660865445,
12+
51.545979673849814
13+
],
14+
[
15+
-2.725072320187934,
16+
51.50533419979146
17+
],
18+
[
19+
-2.639211100415366,
20+
51.4555425006248
21+
],
22+
[
23+
-2.6398332831680023,
24+
51.396186531571374
25+
],
26+
[
27+
-2.5247294740525206,
28+
51.396768827096
29+
],
30+
[
31+
-2.5026419863566787,
32+
51.49507032185082
33+
],
34+
[
35+
-2.67498660865445,
36+
51.545979673849814
37+
]
38+
]
39+
],
40+
"type": "Polygon"
41+
}
42+
}
43+
]
44+
}

importer/config/gb/nottingham/stapleford.geojson

Lines changed: 14 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -8,128 +8,32 @@
88
"coordinates": [
99
[
1010
[
11-
-1.2649320275953357,
12-
52.920091954516806
11+
-1.2433760624927004,
12+
52.95625455024799
1313
],
1414
[
15-
-1.2622562563127246,
16-
52.921858864033794
15+
-1.2795962053782262,
16+
52.957969792170786
1717
],
1818
[
19-
-1.2553757015852511,
20-
52.92930981963164
19+
-1.304849872940025,
20+
52.92764439348608
2121
],
2222
[
23-
-1.2493870706194343,
24-
52.93522358273418
23+
-1.3041125032194145,
24+
52.896553787906385
2525
],
2626
[
27-
-1.2482403114977956,
28-
52.93668269869178
27+
-1.2520888248888298,
28+
52.89908428093173
2929
],
3030
[
31-
-1.2519354242214717,
32-
52.93722025532773
31+
-1.2405764961728778,
32+
52.94648564112964
3333
],
3434
[
35-
-1.2580514728678622,
36-
52.940982964809734
37-
],
38-
[
39-
-1.2546111955041113,
40-
52.9432097203796
41-
],
42-
[
43-
-1.2495144883000648,
44-
52.94881449432094
45-
],
46-
[
47-
-1.2495144883000648,
48-
52.949966070266214
49-
],
50-
[
51-
-1.2560127899857036,
52-
52.94858417545316
53-
],
54-
[
55-
-1.2621288386320941,
56-
52.9463576965033
57-
],
58-
[
59-
-1.2649320275953357,
60-
52.94658802722586
61-
],
62-
[
63-
-1.2669707104774375,
64-
52.94520602449316
65-
],
66-
[
67-
-1.271430329281003,
68-
52.94466856706262
69-
],
70-
[
71-
-1.2771641248868093,
72-
52.942518670570536
73-
],
74-
[
75-
-1.2813689083316717,
76-
52.94129011032254
77-
],
78-
[
79-
-1.2807318199311624,
80-
52.9396007830201
81-
],
82-
[
83-
-1.27933022544957,
84-
52.938679303964705
85-
],
86-
[
87-
-1.2792028077689679,
88-
52.93768101284354
89-
],
90-
[
91-
-1.278310884008505,
92-
52.93560756538747
93-
],
94-
[
95-
-1.2780560486485513,
96-
52.93368761805078
97-
],
98-
[
99-
-1.2804769845699866,
100-
52.93099954868373
101-
],
102-
[
103-
-1.281878579051579,
104-
52.92884897298771
105-
],
106-
[
107-
-1.2850640210553763,
108-
52.9264678538315
109-
],
110-
[
111-
-1.2859559448158393,
112-
52.925853350207404
113-
],
114-
[
115-
-1.2849366033748026,
116-
52.92431705298574
117-
],
118-
[
119-
-1.2836624265737555,
120-
52.922857520127934
121-
],
122-
[
123-
-1.2828979204926156,
124-
52.92132111659606
125-
],
126-
[
127-
-1.2828979204926156,
128-
52.919246885347235
129-
],
130-
[
131-
-1.2649320275953357,
132-
52.920091954516806
35+
-1.2433760624927004,
36+
52.95625455024799
13337
]
13438
]
13539
],

map_model/src/objects/road.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,21 @@ impl Road {
233233

234234
pub(crate) fn speed_limit_from_osm(&self) -> Speed {
235235
if let Some(limit) = self.osm_tags.get("maxspeed") {
236-
if let Ok(kmph) = limit.parse::<f64>() {
237-
if kmph == 0.0 {
238-
warn!("{} has a speed limit of 0", self.orig_id.osm_way_id);
239-
return Speed::miles_per_hour(1.0);
240-
}
241-
return Speed::km_per_hour(kmph);
242-
}
243-
244-
if let Some(mph) = limit
236+
if let Some(speed) = if let Ok(kmph) = limit.parse::<f64>() {
237+
Some(Speed::km_per_hour(kmph))
238+
} else if let Some(mph) = limit
245239
.strip_suffix(" mph")
246240
.and_then(|x| x.parse::<f64>().ok())
247241
{
248-
return Speed::miles_per_hour(mph);
242+
Some(Speed::miles_per_hour(mph))
243+
} else {
244+
None
245+
} {
246+
if speed == Speed::ZERO {
247+
warn!("{} has a speed limit of 0", self.orig_id.osm_way_id);
248+
return Speed::miles_per_hour(1.0);
249+
}
250+
return speed;
249251
}
250252

251253
// TODO Handle implicits, like PL:zone30

0 commit comments

Comments
 (0)