From 150ec77f85008216bab06f959261cadbea11c01b Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Sat, 21 May 2022 12:47:47 +0100 Subject: [PATCH] Remove the osm2polygons tests from #886. Instead, we now have goldenfile tests across larger chunks of OSM in https://github.com/a-b-street/osm2streets/pull/15. --- apps/map_editor/src/app.rs | 24 +- apps/map_editor/src/model.rs | 1 - raw_map/src/geometry/geojson.rs | 186 -------- raw_map/src/geometry/mod.rs | 43 -- .../src/geometry/tests/1705063811_input.json | 202 --------- .../src/geometry/tests/1705063811_output.json | 406 ------------------ .../src/geometry/tests/244420071_input.json | 168 -------- .../src/geometry/tests/244420071_output.json | 378 ---------------- .../src/geometry/tests/53101721_input.json | 114 ----- .../src/geometry/tests/53101721_output.json | 222 ---------- .../src/geometry/tests/53128048_input.json | 145 ------- .../src/geometry/tests/53128048_output.json | 274 ------------ 12 files changed, 1 insertion(+), 2162 deletions(-) delete mode 100644 raw_map/src/geometry/geojson.rs delete mode 100644 raw_map/src/geometry/tests/1705063811_input.json delete mode 100644 raw_map/src/geometry/tests/1705063811_output.json delete mode 100644 raw_map/src/geometry/tests/244420071_input.json delete mode 100644 raw_map/src/geometry/tests/244420071_output.json delete mode 100644 raw_map/src/geometry/tests/53101721_input.json delete mode 100644 raw_map/src/geometry/tests/53101721_output.json delete mode 100644 raw_map/src/geometry/tests/53128048_input.json delete mode 100644 raw_map/src/geometry/tests/53128048_output.json diff --git a/apps/map_editor/src/app.rs b/apps/map_editor/src/app.rs index 92e8685d8f..c4ad009e84 100644 --- a/apps/map_editor/src/app.rs +++ b/apps/map_editor/src/app.rs @@ -1,7 +1,7 @@ use geom::{Distance, Line, Polygon, Pt2D}; use raw_map::osm; use widgetry::mapspace::WorldOutcome; -use widgetry::tools::{open_browser, PopupMsg, URLManager}; +use widgetry::tools::{open_browser, URLManager}; use widgetry::{ lctrl, Canvas, Color, EventCtx, GfxCtx, HorizontalAlignment, Key, Line, Outcome, Panel, SharedAppState, State, Text, Toggle, Transition, VerticalAlignment, Widget, @@ -107,10 +107,6 @@ impl MainState { .btn_outline .text("simplify RawMap") .build_def(ctx), - ctx.style() - .btn_outline - .text("save osm2polygons input") - .build_def(ctx), ]) .section(ctx), ]), @@ -213,24 +209,6 @@ impl State for MainState { WorldOutcome::Keypress("debug intersection geometry", ID::Intersection(i)) => { app.model.debug_intersection_geometry(ctx, i); } - WorldOutcome::Keypress("export to osm2polygon", ID::Intersection(i)) => { - let input = format!("{}_input.json", i.0); - let output = format!("{}_output.json", i.0); - - app.model.map.save_osm2polygon_input(input.clone(), i); - return Transition::Push( - match raw_map::geometry::osm2polygon(input.clone(), output.clone()) { - Ok(()) => PopupMsg::new_state( - ctx, - "Exported", - vec![format!("{input} and {output} written")], - ), - Err(err) => { - PopupMsg::new_state(ctx, "Error", vec![err.to_string()]) - } - }, - ); - } WorldOutcome::Keypress("debug in OSM", ID::Intersection(i)) => { open_browser(i.to_string()); } diff --git a/apps/map_editor/src/model.rs b/apps/map_editor/src/model.rs index 28cc71f91c..6912dd6c5b 100644 --- a/apps/map_editor/src/model.rs +++ b/apps/map_editor/src/model.rs @@ -179,7 +179,6 @@ impl Model { .hotkey(Key::T, "toggle stop sign / traffic signal") .hotkey(Key::P, "debug intersection geometry") .hotkey(Key::D, "debug in OSM") - .hotkey(Key::X, "export to osm2polygon") .build(ctx); } diff --git a/raw_map/src/geometry/geojson.rs b/raw_map/src/geometry/geojson.rs deleted file mode 100644 index b8bb79ff13..0000000000 --- a/raw_map/src/geometry/geojson.rs +++ /dev/null @@ -1,186 +0,0 @@ -use anyhow::Result; -use geojson::Feature; - -use abstutil::{Tags, Timer}; -use geom::{Distance, GPSBounds, PolyLine}; - -use crate::geometry::{InputRoad, Results}; -use crate::{osm, OriginalRoad, RawMap}; - -impl RawMap { - pub fn save_osm2polygon_input(&self, output_path: String, i: osm::NodeID) { - let mut features = Vec::new(); - for id in self.roads_per_intersection(i) { - let (untrimmed_center_pts, total_width) = self.roads[&id].untrimmed_road_geometry(); - - let mut properties = serde_json::Map::new(); - properties.insert("osm_way_id".to_string(), id.osm_way_id.0.into()); - properties.insert("src_i".to_string(), id.i1.0.into()); - properties.insert("dst_i".to_string(), id.i2.0.into()); - properties.insert( - "half_width".to_string(), - (total_width / 2.0).inner_meters().into(), - ); - - let mut osm_tags = serde_json::Map::new(); - for (k, v) in self.roads[&id].osm_tags.inner() { - osm_tags.insert(k.to_string(), v.to_string().into()); - } - properties.insert("osm_tags".to_string(), osm_tags.into()); - - // TODO Both for ror reading and writing, we should find a way to pair a serde struct - // with a geo type - features.push(Feature { - geometry: Some(untrimmed_center_pts.to_geojson(Some(&self.gps_bounds))), - properties: Some(properties), - bbox: None, - id: None, - foreign_members: None, - }); - } - - // Include extra metadata as GeoJSON foreign members. They'll just show up as a top-level - // key/values on the FeatureCollection - let mut extra_props = serde_json::Map::new(); - extra_props.insert("intersection_id".to_string(), i.0.into()); - extra_props.insert("min_lon".to_string(), self.gps_bounds.min_lon.into()); - extra_props.insert("min_lat".to_string(), self.gps_bounds.min_lat.into()); - extra_props.insert("max_lon".to_string(), self.gps_bounds.max_lon.into()); - extra_props.insert("max_lat".to_string(), self.gps_bounds.max_lat.into()); - let fc = geojson::FeatureCollection { - features, - bbox: None, - foreign_members: Some(extra_props), - }; - let gj = geojson::GeoJson::from(fc); - abstio::write_json(output_path, &gj); - } -} - -/// Returns the (intersection_id, input roads, and GPS bounds) previously written by -/// `save_osm2polygon_input`. -pub fn read_osm2polygon_input(path: String) -> Result<(osm::NodeID, Vec, GPSBounds)> { - let geojson: geojson::GeoJson = abstio::maybe_read_json(path, &mut Timer::throwaway())?; - if let geojson::GeoJson::FeatureCollection(collection) = geojson { - let extra_props = collection.foreign_members.as_ref().unwrap(); - let gps_bounds = GPSBounds { - min_lon: extra_props.get("min_lon").and_then(|x| x.as_f64()).unwrap(), - min_lat: extra_props.get("min_lat").and_then(|x| x.as_f64()).unwrap(), - max_lon: extra_props.get("max_lon").and_then(|x| x.as_f64()).unwrap(), - max_lat: extra_props.get("max_lat").and_then(|x| x.as_f64()).unwrap(), - }; - let intersection_id = osm::NodeID( - extra_props - .get("intersection_id") - .and_then(|x| x.as_i64()) - .unwrap(), - ); - - let mut roads = Vec::new(); - for feature in collection.features { - let center_pts = PolyLine::from_geojson(&feature, Some(&gps_bounds))?; - let osm_way_id = feature - .property("osm_way_id") - .and_then(|x| x.as_i64()) - .unwrap(); - let src_i = feature.property("src_i").and_then(|x| x.as_i64()).unwrap(); - let dst_i = feature.property("dst_i").and_then(|x| x.as_i64()).unwrap(); - let id = OriginalRoad::new(osm_way_id, (src_i, dst_i)); - let half_width = Distance::meters( - feature - .property("half_width") - .and_then(|x| x.as_f64()) - .unwrap(), - ); - let mut osm_tags = Tags::empty(); - for (k, v) in feature - .property("osm_tags") - .and_then(|x| x.as_object()) - .unwrap() - { - osm_tags.insert(k, v.as_str().unwrap()); - } - - roads.push(InputRoad { - id, - center_pts, - half_width, - osm_tags, - }); - } - - return Ok((intersection_id, roads, gps_bounds)); - } - bail!("No FeatureCollection") -} - -impl Results { - pub fn save_to_geojson( - &self, - output_path: String, - gps_bounds: &GPSBounds, - debug_output: bool, - ) -> Result<()> { - let mut features = Vec::new(); - - { - let mut properties = serde_json::Map::new(); - properties.insert("intersection_id".to_string(), self.intersection_id.0.into()); - features.push(Feature { - geometry: Some(self.intersection_polygon.to_geojson(Some(gps_bounds))), - properties: Some(properties), - bbox: None, - id: None, - foreign_members: None, - }); - } - - for (id, (pl, half_width)) in &self.trimmed_center_pts { - // Add both a line-string and polygon per road - let mut properties = serde_json::Map::new(); - properties.insert("osm_way_id".to_string(), id.osm_way_id.0.into()); - properties.insert("src_i".to_string(), id.i1.0.into()); - properties.insert("dst_i".to_string(), id.i2.0.into()); - features.push(Feature { - geometry: Some(pl.to_geojson(Some(gps_bounds))), - properties: Some(properties.clone()), - bbox: None, - id: None, - foreign_members: None, - }); - - features.push(Feature { - geometry: Some( - pl.make_polygons(2.0 * *half_width) - .to_geojson(Some(gps_bounds)), - ), - properties: Some(properties), - bbox: None, - id: None, - foreign_members: None, - }); - } - - if debug_output { - for (label, polygon) in &self.debug { - let mut properties = serde_json::Map::new(); - properties.insert("debug".to_string(), label.clone().into()); - features.push(Feature { - geometry: Some(polygon.to_geojson(Some(gps_bounds))), - properties: Some(properties), - bbox: None, - id: None, - foreign_members: None, - }); - } - } - - let fc = geojson::FeatureCollection { - features, - bbox: None, - foreign_members: None, - }; - abstio::write_json(output_path, &geojson::GeoJson::from(fc)); - Ok(()) - } -} diff --git a/raw_map/src/geometry/mod.rs b/raw_map/src/geometry/mod.rs index 71ec44bf87..83e4930211 100644 --- a/raw_map/src/geometry/mod.rs +++ b/raw_map/src/geometry/mod.rs @@ -9,12 +9,9 @@ //! I wrote a novella about this: mod algorithm; -mod geojson; use std::collections::BTreeMap; -use anyhow::Result; - use abstutil::Tags; use geom::{Distance, PolyLine, Polygon}; @@ -42,43 +39,3 @@ pub struct Results { /// Extra polygons with labels to debug the algorithm pub debug: Vec<(String, Polygon)>, } - -/// Process the file produced by `save_osm2polygon_input`, then write the output as GeoJSON. -pub fn osm2polygon(input_path: String, output_path: String) -> Result<()> { - let (intersection_id, input_roads, gps_bounds) = geojson::read_osm2polygon_input(input_path)?; - let results = intersection_polygon(intersection_id, input_roads, &BTreeMap::new())?; - let debug_output = false; - results.save_to_geojson(output_path, &gps_bounds, debug_output)?; - Ok(()) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_osm2polygon() { - let mut any = false; - for entry in std::fs::read_dir("src/geometry/tests").unwrap() { - let input = entry.unwrap().path().display().to_string(); - println!("Working on {input}"); - if input.ends_with("output.json") { - continue; - } - any = true; - - let expected_output_path = input.replace("input", "output"); - let actual_output_path = "actual_osm2polygon_output.json"; - osm2polygon(input.clone(), actual_output_path.to_string()).unwrap(); - let expected_output = std::fs::read_to_string(expected_output_path.clone()).unwrap(); - let actual_output = std::fs::read_to_string(actual_output_path).unwrap(); - - if expected_output != actual_output { - panic!("osm2polygon output changed. Manually compare {actual_output_path} and {expected_output_path}"); - } - - std::fs::remove_file(actual_output_path).unwrap(); - } - assert!(any, "Didn't find any tests"); - } -} diff --git a/raw_map/src/geometry/tests/1705063811_input.json b/raw_map/src/geometry/tests/1705063811_input.json deleted file mode 100644 index 743e7770be..0000000000 --- a/raw_map/src/geometry/tests/1705063811_input.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - -122.30553189986347, - 47.639547899956575 - ], - [ - -122.30381599967639, - 47.63953679963023 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1705063811, - "half_width": 6.072, - "osm_tags": { - "abst:osm_way_id": "6348168", - "abst:parking_inferred": "true", - "abst:sidewalks_inferred": "true", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "East Lynn Street", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6348168, - "src_i": 53084808 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30381599967639, - 47.63953679963023 - ], - [ - -122.30281910035515, - 47.63953180030153 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 429678958, - "half_width": 5.0052, - "osm_tags": { - "abst:osm_way_id": "6348168", - "abst:parking_inferred": "true", - "abst:sidewalks_inferred": "true", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "East Lynn Street", - "parking:lane:left": "no_parking", - "parking:lane:right": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6348168, - "src_i": 1705063811 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30397629973672, - 47.63833100003878 - ], - [ - -122.30393190057416, - 47.63938749965635 - ], - [ - -122.30390710003202, - 47.639459799715986 - ], - [ - -122.30381599967639, - 47.63953679963023 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1705063811, - "half_width": 6.072, - "osm_tags": { - "abst:endpt_fwd": "true", - "abst:osm_way_id": "6383154", - "abst:parking_inferred": "true", - "abst:sidewalks_inferred": "true", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "22nd Avenue East", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6383154, - "src_i": 53128043 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30289699973345, - 47.63775740014035 - ], - [ - -122.30339880101705, - 47.63930369997159 - ], - [ - -122.3034543006375, - 47.639367100344806 - ], - [ - -122.30355540047991, - 47.63942189960636 - ], - [ - -122.30381599967639, - 47.63953679963023 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1705063811, - "half_width": 5.0052, - "osm_tags": { - "abst:endpt_fwd": "true", - "abst:osm_way_id": "6460090", - "abst:sidewalks_inferred": "true", - "bicycle": "designated", - "cycleway": "shared_lane", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "23rd Avenue East", - "parking:condition:right:maxstay": "3 days", - "parking:lane:left": "no_stopping", - "parking:lane:right": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6460090, - "src_i": 53211703 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30381599967639, - 47.63953679963023 - ], - [ - -122.30379070002733, - 47.64027179987448 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128048, - "half_width": 6.072, - "osm_tags": { - "abst:endpt_back": "true", - "abst:osm_way_id": "36952952", - "abst:sidewalks_inferred": "true", - "cycleway": "shared_lane", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "22nd Avenue East", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 36952952, - "src_i": 1705063811 - }, - "type": "Feature" - } - ], - "intersection_id": 1705063811, - "max_lat": 47.6475, - "max_lon": -122.29823763124188, - "min_lat": 47.631503395519445, - "min_lon": -122.32188980178574, - "type": "FeatureCollection" -} \ No newline at end of file diff --git a/raw_map/src/geometry/tests/1705063811_output.json b/raw_map/src/geometry/tests/1705063811_output.json deleted file mode 100644 index 312230f0c8..0000000000 --- a/raw_map/src/geometry/tests/1705063811_output.json +++ /dev/null @@ -1,406 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - [ - -122.30398221962506, - 47.63948326571415 - ], - [ - -122.30398066358588, - 47.63959247393169 - ], - [ - -122.30389515616352, - 47.639591920848915 - ], - [ - -122.30373313591923, - 47.639589387460006 - ], - [ - -122.30373341082839, - 47.639581399685675 - ], - [ - -122.30358833486322, - 47.639580672134514 - ], - [ - -122.30358932773899, - 47.63949064824505 - ], - [ - -122.30366246558403, - 47.63941531387438 - ], - [ - -122.30378971649314, - 47.6394714198502 - ], - [ - -122.30383198844605, - 47.639435691602216 - ], - [ - -122.30395870555098, - 47.63950377564225 - ], - [ - -122.30398221962506, - 47.63948326571415 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "intersection_id": 1705063811 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30553189986347, - 47.639547899956575 - ], - [ - -122.30398144160547, - 47.63953786982292 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1705063811, - "osm_way_id": 6348168, - "src_i": 53084808 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30553267788305, - 47.6394932958478 - ], - [ - -122.30398221962506, - 47.63948326571415 - ], - [ - -122.30398066358588, - 47.63959247393169 - ], - [ - -122.30553112184387, - 47.639602504065344 - ], - [ - -122.30553267788305, - 47.6394932958478 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 1705063811, - "osm_way_id": 6348168, - "src_i": 53084808 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30358883130111, - 47.63953566018978 - ], - [ - -122.30281910035515, - 47.63953180030153 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 429678958, - "osm_way_id": 6348168, - "src_i": 1705063811 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30358932773899, - 47.63949064824505 - ], - [ - -122.30281959679304, - 47.6394867883568 - ], - [ - -122.30281860391726, - 47.63957681224626 - ], - [ - -122.30358833486322, - 47.639580672134514 - ], - [ - -122.30358932773899, - 47.63949064824505 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 429678958, - "osm_way_id": 6348168, - "src_i": 1705063811 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30397629973672, - 47.63833100003878 - ], - [ - -122.30393190057416, - 47.63938749965635 - ], - [ - -122.30390710003202, - 47.639459799715986 - ], - [ - -122.30389534699852, - 47.639469733622235 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1705063811, - "osm_way_id": 6383154, - "src_i": 53128043 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30389530029065, - 47.638329454104976 - ], - [ - -122.30385112932937, - 47.63938050922966 - ], - [ - -122.30383228737638, - 47.63943543799353 - ], - [ - -122.30383198844605, - 47.639435691602216 - ], - [ - -122.30395870555098, - 47.63950377564225 - ], - [ - -122.30398191268765, - 47.639484161438446 - ], - [ - -122.30401267181894, - 47.63939449008305 - ], - [ - -122.30405729918277, - 47.638332545972595 - ], - [ - -122.30389530029065, - 47.638329454104976 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 1705063811, - "osm_way_id": 6383154, - "src_i": 53128043 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30289699973345, - 47.63775740014035 - ], - [ - -122.30339880101705, - 47.63930369997159 - ], - [ - -122.3034543006375, - 47.639367100344806 - ], - [ - -122.30355540047991, - 47.63942189960636 - ], - [ - -122.30362589599426, - 47.63945298105972 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1705063811, - "osm_way_id": 6460090, - "src_i": 53211703 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30283174751065, - 47.637767016586075 - ], - [ - -122.30333583481065, - 47.63932036170263 - ], - [ - -122.30340295401356, - 47.639397036062455 - ], - [ - -122.30351608580216, - 47.63945835630484 - ], - [ - -122.30358932640449, - 47.63949064824505 - ], - [ - -122.30366246558403, - 47.63941531387438 - ], - [ - -122.30359471515767, - 47.63938544290789 - ], - [ - -122.30350564726145, - 47.63933716462715 - ], - [ - -122.30346176722345, - 47.63928703824056 - ], - [ - -122.30296225195625, - 47.63774778369463 - ], - [ - -122.30283174751065, - 47.637767016586075 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 1705063811, - "osm_way_id": 6460090, - "src_i": 53211703 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30381414604138, - 47.6395906537048 - ], - [ - -122.30379070002733, - 47.64027179987448 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128048, - "osm_way_id": 36952952, - "src_i": 1705063811 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30373313591923, - 47.639589387460006 - ], - [ - -122.30370968990519, - 47.64027053362969 - ], - [ - -122.3038717101495, - 47.64027306611928 - ], - [ - -122.30389515616352, - 47.639591919949595 - ], - [ - -122.30373313591923, - 47.639589387460006 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53128048, - "osm_way_id": 36952952, - "src_i": 1705063811 - }, - "type": "Feature" - } - ], - "type": "FeatureCollection" -} \ No newline at end of file diff --git a/raw_map/src/geometry/tests/244420071_input.json b/raw_map/src/geometry/tests/244420071_input.json deleted file mode 100644 index fcc93f9bc6..0000000000 --- a/raw_map/src/geometry/tests/244420071_input.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - -122.33435550043262, - 47.62456949994853 - ], - [ - -122.3336416001769, - 47.62461460002774 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 244420071, - "half_width": 3.6576, - "osm_tags": { - "abst:endpt_back": "true", - "abst:endpt_fwd": "true", - "abst:osm_way_id": "22768205", - "abst:sidewalks_inferred": "true", - "bicycle": "no", - "destination:ref": "I 5 North;I 5 South", - "destination:ref:to": "WA 520;I 90", - "highway": "motorway_link", - "lanes": "3", - "oneway": "yes", - "sidewalk": "none" - }, - "osm_way_id": 22768205, - "src_i": 2706253474 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.3336416001769, - 47.62461460002774 - ], - [ - -122.33327549963687, - 47.62470659972869 - ], - [ - -122.3328376006815, - 47.624775700003596 - ], - [ - -122.33242239997828, - 47.62487450037453 - ], - [ - -122.33219600048942, - 47.624949100001054 - ], - [ - -122.33180189970145, - 47.62505780010423 - ], - [ - -122.33077330051393, - 47.62527980034059 - ], - [ - -122.33025129941775, - 47.625413300136366 - ], - [ - -122.3300625996004, - 47.62548210003785 - ], - [ - -122.32987579964264, - 47.62558279977602 - ], - [ - -122.32969610014321, - 47.625683000390694 - ], - [ - -122.32942609994427, - 47.62586320015882 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 244420243, - "half_width": 2.4384, - "osm_tags": { - "abst:endpt_back": "true", - "abst:endpt_fwd": "true", - "abst:osm_way_id": "22768213", - "abst:sidewalks_inferred": "true", - "bicycle": "no", - "destination:ref": "I 5 North", - "destination:ref:to": "WA 520", - "highway": "motorway_link", - "lanes": "2", - "lit": "yes", - "oneway": "yes", - "sidewalk": "none" - }, - "osm_way_id": 22768213, - "src_i": 244420071 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.3336416001769, - 47.62461460002774 - ], - [ - -122.33312739997889, - 47.624658700061325 - ], - [ - -122.33202610047641, - 47.624795199993976 - ], - [ - -122.33172640029561, - 47.624838999654145 - ], - [ - -122.33149019998618, - 47.624887400243644 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1806347875, - "half_width": 2.4384, - "osm_tags": { - "abst:endpt_back": "true", - "abst:endpt_fwd": "true", - "abst:osm_way_id": "402084476", - "abst:sidewalks_inferred": "true", - "bicycle": "no", - "destination:ref": "I 5 South", - "destination:ref:to": "I 90", - "highway": "motorway_link", - "lanes": "2", - "oneway": "yes", - "sidewalk": "none" - }, - "osm_way_id": 402084476, - "src_i": 244420071 - }, - "type": "Feature" - } - ], - "intersection_id": 244420071, - "max_lat": 47.630150806746016, - "max_lon": -122.32873656565454, - "min_lat": 47.61820860452586, - "min_lon": -122.3434292284645, - "type": "FeatureCollection" -} \ No newline at end of file diff --git a/raw_map/src/geometry/tests/244420071_output.json b/raw_map/src/geometry/tests/244420071_output.json deleted file mode 100644 index e4295c349c..0000000000 --- a/raw_map/src/geometry/tests/244420071_output.json +++ /dev/null @@ -1,378 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - [ - -122.33343490105786, - 47.62466548634216 - ], - [ - -122.33338940048819, - 47.62470138006609 - ], - [ - -122.33336667421844, - 47.62466028466599 - ], - [ - -122.33335846106142, - 47.62461677728535 - ], - [ - -122.33342258399067, - 47.624600225271195 - ], - [ - -122.33343490105786, - 47.62466548634216 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "intersection_id": 244420071 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.33435550043262, - 47.62456949994853 - ], - [ - -122.3336416001769, - 47.62461460002774 - ], - [ - -122.33342874252426, - 47.624632855357014 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 244420071, - "osm_way_id": 22768205, - "src_i": 2706253474 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.33435094690681, - 47.62453675025293 - ], - [ - -122.33363624748263, - 47.62458190069415 - ], - [ - -122.33342258399067, - 47.624600225271195 - ], - [ - -122.33343490105786, - 47.62466548634216 - ], - [ - -122.33364699156215, - 47.62464729666336 - ], - [ - -122.33436005395843, - 47.62460224964413 - ], - [ - -122.33435094690681, - 47.62453675025293 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 244420071, - "osm_way_id": 22768205, - "src_i": 2706253474 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.33337803601914, - 47.62468083236604 - ], - [ - -122.33327549963687, - 47.62470659972869 - ], - [ - -122.3328376006815, - 47.624775700003596 - ], - [ - -122.33242239997828, - 47.62487450037453 - ], - [ - -122.33219600048942, - 47.624949100001054 - ], - [ - -122.33180189970145, - 47.62505780010423 - ], - [ - -122.33077330051393, - 47.62527980034059 - ], - [ - -122.33025129941775, - 47.625413300136366 - ], - [ - -122.3300625996004, - 47.62548210003785 - ], - [ - -122.32987579964264, - 47.62558279977602 - ], - [ - -122.32969610014321, - 47.625683000390694 - ], - [ - -122.32942609994427, - 47.62586320015882 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 244420243, - "osm_way_id": 22768213, - "src_i": 244420071 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.3333666715501, - 47.62466028466599 - ], - [ - -122.33326606971585, - 47.62468556639497 - ], - [ - -122.33282845360473, - 47.6247546217038 - ], - [ - -122.33240979206181, - 47.62485424585333 - ], - [ - -122.33218267478892, - 47.62492908110211 - ], - [ - -122.33179076871234, - 47.62503717596184 - ], - [ - -122.33076257778116, - 47.62525908806469 - ], - [ - -122.33023772556145, - 47.62539331721028 - ], - [ - -122.33004455893939, - 47.6254637457832 - ], - [ - -122.32985528142598, - 47.625565781013954 - ], - [ - -122.32967424241882, - 47.62566672896488 - ], - [ - -122.32940321090565, - 47.62584761671403 - ], - [ - -122.3294489889829, - 47.6258787836036 - ], - [ - -122.32971795786762, - 47.62569927181651 - ], - [ - -122.3298963178593, - 47.62559981853809 - ], - [ - -122.33008064026141, - 47.625500454292506 - ], - [ - -122.33026487327407, - 47.62543328306244 - ], - [ - -122.33078402324671, - 47.62530051261649 - ], - [ - -122.33181303069057, - 47.62507842424662 - ], - [ - -122.33220932618993, - 47.624969118900005 - ], - [ - -122.33243500789476, - 47.62489475489574 - ], - [ - -122.33284674775825, - 47.62479677830339 - ], - [ - -122.33328492955789, - 47.624727633062406 - ], - [ - -122.33338940048819, - 47.62470138006609 - ], - [ - -122.3333666715501, - 47.62466028466599 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 244420243, - "osm_way_id": 22768213, - "src_i": 244420071 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.33336256763992, - 47.624638530975666 - ], - [ - -122.33312739997889, - 47.624658700061325 - ], - [ - -122.33202610047641, - 47.624795199993976 - ], - [ - -122.33172640029561, - 47.624838999654145 - ], - [ - -122.33149019998618, - 47.624887400243644 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 1806347875, - "osm_way_id": 402084476, - "src_i": 244420071 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.33335846106142, - 47.62461677728535 - ], - [ - -122.33312239950578, - 47.62463702281334 - ], - [ - -122.3320197258071, - 47.624773693617094 - ], - [ - -122.33171820314865, - 47.62481775947646 - ], - [ - -122.33148073804506, - 47.624866419070585 - ], - [ - -122.33149966192731, - 47.62490838141671 - ], - [ - -122.33173459744258, - 47.62486023983183 - ], - [ - -122.33203247514571, - 47.62481670637086 - ], - [ - -122.333132400452, - 47.62468037730931 - ], - [ - -122.33336667421844, - 47.62466028466599 - ], - [ - -122.33335846106142, - 47.62461677728535 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 1806347875, - "osm_way_id": 402084476, - "src_i": 244420071 - }, - "type": "Feature" - } - ], - "type": "FeatureCollection" -} \ No newline at end of file diff --git a/raw_map/src/geometry/tests/53101721_input.json b/raw_map/src/geometry/tests/53101721_input.json deleted file mode 100644 index 595ecf33c3..0000000000 --- a/raw_map/src/geometry/tests/53101721_input.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - -122.30688540039368, - 47.64175750071926 - ], - [ - -122.30553090031513, - 47.641729899640445 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53101724, - "half_width": 6.072, - "osm_tags": { - "abst:endpt_back": "true", - "abst:osm_way_id": "6361203", - "abst:sidewalks_inferred": "true", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "East Miller Street", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6361203, - "src_i": 53101721 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30688540039368, - 47.64175750071926 - ], - [ - -122.3060409995847, - 47.642475100889456 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53206817, - "half_width": 6.072, - "osm_tags": { - "abst:osm_way_id": "6454018", - "abst:parking_inferred": "true", - "abst:sidewalks_inferred": "true", - "highway": "tertiary", - "lanes": "2", - "maxspeed": "25 mph", - "name": "West Montlake Place East", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6454018, - "src_i": 53101721 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30722609957617, - 47.64142270037968 - ], - [ - -122.3071591004792, - 47.64152059962827 - ], - [ - -122.30688540039368, - 47.64175750071926 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53101721, - "half_width": 6.072, - "osm_tags": { - "abst:endpt_back": "true", - "abst:osm_way_id": "6454018", - "abst:parking_inferred": "true", - "abst:sidewalks_inferred": "true", - "highway": "tertiary", - "lanes": "2", - "maxspeed": "25 mph", - "name": "West Montlake Place East", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6454018, - "src_i": 53126103 - }, - "type": "Feature" - } - ], - "intersection_id": 53101721, - "max_lat": 47.6475, - "max_lon": -122.29823763124188, - "min_lat": 47.631503395519445, - "min_lon": -122.32188980178574, - "type": "FeatureCollection" -} \ No newline at end of file diff --git a/raw_map/src/geometry/tests/53101721_output.json b/raw_map/src/geometry/tests/53101721_output.json deleted file mode 100644 index eb81182d42..0000000000 --- a/raw_map/src/geometry/tests/53101721_output.json +++ /dev/null @@ -1,222 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - [ - -122.30684860927518, - 47.64187665273558 - ], - [ - -122.30672162526814, - 47.64180879532459 - ], - [ - -122.30672652292148, - 47.64169963207313 - ], - [ - -122.30684673295349, - 47.6417020809258 - ], - [ - -122.3069746084135, - 47.64176917481277 - ], - [ - -122.30684860927518, - 47.64187665273558 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "intersection_id": 53101721 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30672407409482, - 47.64175421369886 - ], - [ - -122.30553090031513, - 47.641729899640445 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53101724, - "osm_way_id": 6361203, - "src_i": 53101721 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30672652292148, - 47.64169963207313 - ], - [ - -122.30553334914181, - 47.64167531801471 - ], - [ - -122.30552845148847, - 47.64178448126618 - ], - [ - -122.30672162526814, - 47.64180879532459 - ], - [ - -122.30672652292148, - 47.64169963207313 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53101724, - "osm_way_id": 6361203, - "src_i": 53101721 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30678511727166, - 47.64184272403009 - ], - [ - -122.3060409995847, - 47.642475100889456 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53206817, - "osm_way_id": 6454018, - "src_i": 53101721 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30672162526814, - 47.64180879532459 - ], - [ - -122.30597750758119, - 47.64244117218396 - ], - [ - -122.30610449158821, - 47.642509029594954 - ], - [ - -122.30684860927518, - 47.64187665273558 - ], - [ - -122.30672162526814, - 47.64180879532459 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53206817, - "osm_way_id": 6454018, - "src_i": 53101721 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30722609957617, - 47.64142270037968 - ], - [ - -122.3071591004792, - 47.64152059962827 - ], - [ - -122.3069106706835, - 47.64173562831895 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53101721, - "osm_way_id": 6454018, - "src_i": 53126103 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30715251600466, - 47.641399830631734 - ], - [ - -122.30708942435427, - 47.64149201918825 - ], - [ - -122.30684673295349, - 47.64170208182512 - ], - [ - -122.3069746084135, - 47.64176917481277 - ], - [ - -122.30722877660413, - 47.641549180068296 - ], - [ - -122.30729968314769, - 47.64144557012762 - ], - [ - -122.30715251600466, - 47.641399830631734 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53101721, - "osm_way_id": 6454018, - "src_i": 53126103 - }, - "type": "Feature" - } - ], - "type": "FeatureCollection" -} \ No newline at end of file diff --git a/raw_map/src/geometry/tests/53128048_input.json b/raw_map/src/geometry/tests/53128048_input.json deleted file mode 100644 index 689ec70e08..0000000000 --- a/raw_map/src/geometry/tests/53128048_input.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - -122.30379070002733, - 47.64027179987448 - ], - [ - -122.30208770055275, - 47.64026030024936 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53219808, - "half_width": 5.0052, - "osm_tags": { - "abst:endpt_fwd": "true", - "abst:osm_way_id": "6470476", - "abst:parking_inferred": "true", - "abst:sidewalks_inferred": "true", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "East McGraw Street", - "parking:lane:left": "no_parking", - "parking:lane:right": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6470476, - "src_i": 53128048 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30553700036239, - 47.64027949986591 - ], - [ - -122.30379070002733, - 47.64027179987448 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128048, - "half_width": 6.072, - "osm_tags": { - "abst:osm_way_id": "6470476", - "abst:parking_inferred": "true", - "abst:sidewalks_inferred": "true", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "East McGraw Street", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 6470476, - "src_i": 53132239 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30379070002733, - 47.64027179987448 - ], - [ - -122.3037816000006, - 47.64098820034969 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128049, - "half_width": 6.072, - "osm_tags": { - "abst:osm_way_id": "36952952", - "abst:sidewalks_inferred": "true", - "cycleway": "shared_lane", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "22nd Avenue East", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 36952952, - "src_i": 53128048 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30381599967639, - 47.63953679963023 - ], - [ - -122.30379070002733, - 47.64027179987448 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128048, - "half_width": 6.072, - "osm_tags": { - "abst:endpt_back": "true", - "abst:osm_way_id": "36952952", - "abst:sidewalks_inferred": "true", - "cycleway": "shared_lane", - "highway": "residential", - "lanes": "2", - "maxspeed": "25 mph", - "name": "22nd Avenue East", - "parking:lane:both": "parallel", - "sidewalk": "both" - }, - "osm_way_id": 36952952, - "src_i": 1705063811 - }, - "type": "Feature" - } - ], - "intersection_id": 53128048, - "max_lat": 47.6475, - "max_lon": -122.29823763124188, - "min_lat": 47.631503395519445, - "min_lon": -122.32188980178574, - "type": "FeatureCollection" -} \ No newline at end of file diff --git a/raw_map/src/geometry/tests/53128048_output.json b/raw_map/src/geometry/tests/53128048_output.json deleted file mode 100644 index bf863347e3..0000000000 --- a/raw_map/src/geometry/tests/53128048_output.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "features": [ - { - "geometry": { - "coordinates": [ - [ - [ - -122.30387362116845, - 47.64021755729299 - ], - [ - -122.30387256423617, - 47.64032676910782 - ], - [ - -122.30387103622171, - 47.64032676191325 - ], - [ - -122.30370897861113, - 47.64032582482016 - ], - [ - -122.30370910005158, - 47.640316263233046 - ], - [ - -122.30371043723105, - 47.64022624294088 - ], - [ - -122.30371160092415, - 47.640215023904084 - ], - [ - -122.30387362116845, - 47.64021755729299 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "intersection_id": 53128048 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30370976864131, - 47.640271253086965 - ], - [ - -122.30208770055275, - 47.64026030024936 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53219808, - "osm_way_id": 6470476, - "src_i": 53128048 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30371043723105, - 47.64022624294088 - ], - [ - -122.30208836914248, - 47.64021529010327 - ], - [ - -122.30208703196301, - 47.64030531039545 - ], - [ - -122.30370910005158, - 47.640316263233046 - ], - [ - -122.30371043723105, - 47.64022624294088 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53219808, - "osm_way_id": 6470476, - "src_i": 53128048 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30553700036239, - 47.64027949986591 - ], - [ - -122.30387309403682, - 47.64027216320041 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128048, - "osm_way_id": 6470476, - "src_i": 53132239 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30553753016304, - 47.6402248939585 - ], - [ - -122.30387362383746, - 47.64021755729299 - ], - [ - -122.30387256423617, - 47.64032676910782 - ], - [ - -122.30553647056175, - 47.64033410577333 - ], - [ - -122.30553753016304, - 47.6402248939585 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53128048, - "osm_way_id": 6470476, - "src_i": 53132239 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30379000741642, - 47.640326292467385 - ], - [ - -122.3037816000006, - 47.64098820034969 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128049, - "osm_way_id": 36952952, - "src_i": 53128048 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30370897861113, - 47.64032582482016 - ], - [ - -122.30370057119531, - 47.64098773270246 - ], - [ - -122.3038626288059, - 47.640988667996915 - ], - [ - -122.30387103622171, - 47.640326760114604 - ], - [ - -122.30370897861113, - 47.64032582482016 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53128049, - "osm_way_id": 36952952, - "src_i": 53128048 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - -122.30381599967639, - 47.63953679963023 - ], - [ - -122.3037926110463, - 47.64021629014888 - ] - ], - "type": "LineString" - }, - "properties": { - "dst_i": 53128048, - "osm_way_id": 36952952, - "src_i": 1705063811 - }, - "type": "Feature" - }, - { - "geometry": { - "coordinates": [ - [ - [ - -122.30373498955424, - 47.639535533385434 - ], - [ - -122.30371160092415, - 47.640215023904084 - ], - [ - -122.30387362116845, - 47.64021755639367 - ], - [ - -122.30389700979853, - 47.63953806587502 - ], - [ - -122.30373498955424, - 47.639535533385434 - ] - ] - ], - "type": "Polygon" - }, - "properties": { - "dst_i": 53128048, - "osm_way_id": 36952952, - "src_i": 1705063811 - }, - "type": "Feature" - } - ], - "type": "FeatureCollection" -} \ No newline at end of file