Remove London from screenshot testing, and use Cambridge instead. #449

This will make it easier to visually track the progress improving the
import. Originally London was added to have one left-hand driving map
under the test, but Cambridge works for that too, and it also includes
separate cycleways.

Also fix a crash when trying to draw very very tiny arrows.
This commit is contained in:
Dustin Carlino 2021-01-12 12:30:21 -08:00
parent c5ae753f20
commit f680de73aa
3 changed files with 9 additions and 10 deletions

View File

@ -55,6 +55,11 @@
"uncompressed_size_bytes": 14840548,
"compressed_size_bytes": 3387178
},
"data/input/cambridge/screenshots/trumpington.zip": {
"checksum": "a42f59cf1aab838872f7246baa17845c",
"uncompressed_size_bytes": 39274168,
"compressed_size_bytes": 39250810
},
"data/input/krakow/osm/center.osm": {
"checksum": "e64103d37a7009d96f7d8a653db02deb",
"uncompressed_size_bytes": 56598855,
@ -155,11 +160,6 @@
"uncompressed_size_bytes": 3349383,
"compressed_size_bytes": 786484
},
"data/input/london/screenshots/southbank.zip": {
"checksum": "54bbcb9fd4b2eb8bceb474abb1724a03",
"uncompressed_size_bytes": 7148105,
"compressed_size_bytes": 7147592
},
"data/input/nyc/osm/lower_manhattan.osm": {
"checksum": "09bf8cdb40474741b58e74f4c486a69e",
"uncompressed_size_bytes": 34156510,

View File

@ -235,7 +235,7 @@ impl State<App> for DebugMode {
MapName::new("krakow", "center"),
MapName::seattle("lakeslice"),
MapName::seattle("montlake"),
MapName::new("london", "southbank"),
MapName::new("cambridge", "trumpington"),
MapName::seattle("udistrict"),
],
));

View File

@ -525,10 +525,9 @@ impl PolyLine {
let head_size = thickness * 2.0;
let triangle_height = head_size / 2.0_f64.sqrt();
if self.length() < triangle_height + EPSILON_DIST {
return None;
}
let slice = self.exact_slice(Distance::ZERO, self.length() - triangle_height);
let slice = self
.maybe_exact_slice(Distance::ZERO, self.length() - triangle_height)
.ok()?;
let angle = slice.last_pt().angle_to(self.last_pt());
let corner1 = self