mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-22 14:52:07 +03:00
Update to new osm2streets API
This commit is contained in:
parent
177e509c04
commit
6b8a54d031
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -1014,7 +1014,7 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
|
||||
[[package]]
|
||||
name = "driving-side"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#997d5ed09c4ec5775111d3dcd306d83aaf50696a"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#e97599d62a45d63c12708a6ac53967fdf43d64b9"
|
||||
dependencies = [
|
||||
"geo",
|
||||
"geojson",
|
||||
@ -2934,7 +2934,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "osm-tag-schemes"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#997d5ed09c4ec5775111d3dcd306d83aaf50696a"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#e97599d62a45d63c12708a6ac53967fdf43d64b9"
|
||||
dependencies = [
|
||||
"osm-tags",
|
||||
"strum 0.24.1",
|
||||
@ -2943,7 +2943,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "osm-tags"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#997d5ed09c4ec5775111d3dcd306d83aaf50696a"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#e97599d62a45d63c12708a6ac53967fdf43d64b9"
|
||||
dependencies = [
|
||||
"kstring",
|
||||
]
|
||||
@ -2951,7 +2951,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "osm2lanes"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#997d5ed09c4ec5775111d3dcd306d83aaf50696a"
|
||||
source = "git+https://github.com/a-b-street/osm2lanes#e97599d62a45d63c12708a6ac53967fdf43d64b9"
|
||||
dependencies = [
|
||||
"celes",
|
||||
"locale-codes",
|
||||
@ -2963,7 +2963,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "osm2streets"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/a-b-street/osm2streets#7940508e24ab041b114935ea728338241a974184"
|
||||
source = "git+https://github.com/a-b-street/osm2streets#4b529b38a4a5f9695039eff886ace1a9eedd4fd9"
|
||||
dependencies = [
|
||||
"aabb-quadtree",
|
||||
"abstutil",
|
||||
@ -3987,7 +3987,7 @@ checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e"
|
||||
[[package]]
|
||||
name = "streets_reader"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/a-b-street/osm2streets#7940508e24ab041b114935ea728338241a974184"
|
||||
source = "git+https://github.com/a-b-street/osm2streets#4b529b38a4a5f9695039eff886ace1a9eedd4fd9"
|
||||
dependencies = [
|
||||
"abstutil",
|
||||
"anyhow",
|
||||
|
@ -7,7 +7,8 @@ use geom::{
|
||||
Bounds, Circle, Distance, FindClosest, GPSBounds, HashablePt2D, LonLat, PolyLine, Polygon, Pt2D,
|
||||
};
|
||||
use osm2streets::{
|
||||
osm, ControlType, Intersection, IntersectionComplexity, OriginalRoad, Road, Transformation,
|
||||
osm, ConflictType, ControlType, Intersection, IntersectionComplexity, OriginalRoad, Road,
|
||||
Transformation,
|
||||
};
|
||||
use raw_map::{RawBuilding, RawMap};
|
||||
use widgetry::mapspace::{ObjectID, World};
|
||||
@ -206,6 +207,7 @@ impl Model {
|
||||
id,
|
||||
point,
|
||||
IntersectionComplexity::Crossing,
|
||||
ConflictType::Cross,
|
||||
ControlType::StopSign,
|
||||
),
|
||||
);
|
||||
@ -524,7 +526,7 @@ impl Model {
|
||||
self.stop_showing_pts(id);
|
||||
|
||||
let (retained_i, deleted_i, deleted_roads, created_roads) =
|
||||
match self.map.streets.merge_short_road(id) {
|
||||
match self.map.streets.collapse_short_road(id) {
|
||||
Ok((retained_i, deleted_i, deleted_roads, created_roads)) => {
|
||||
(retained_i, deleted_i, deleted_roads, created_roads)
|
||||
}
|
||||
|
@ -161,8 +161,7 @@ impl Map {
|
||||
/// A dummy map that won't crash UIs, but has almost nothing in it.
|
||||
pub fn almost_blank() -> Self {
|
||||
use geom::LonLat;
|
||||
use osm2streets::ControlType;
|
||||
use osm2streets::IntersectionComplexity;
|
||||
use osm2streets::{ConflictType, ControlType, IntersectionComplexity};
|
||||
use raw_map::RawBuilding;
|
||||
|
||||
// Programatically creating a Map is very verbose. RawMap less so, but .osm could be even
|
||||
@ -185,6 +184,7 @@ impl Map {
|
||||
i1,
|
||||
Pt2D::new(30.0, 30.0),
|
||||
IntersectionComplexity::MapEdge,
|
||||
ConflictType::Uncontested,
|
||||
ControlType::Border,
|
||||
),
|
||||
);
|
||||
@ -194,6 +194,7 @@ impl Map {
|
||||
i2,
|
||||
Pt2D::new(70.0, 70.0),
|
||||
IntersectionComplexity::MapEdge,
|
||||
ConflictType::Uncontested,
|
||||
ControlType::Border,
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user