download offstreet parking dataset, tweak KML debug rendering

This commit is contained in:
Dustin Carlino 2019-08-24 18:41:28 -07:00
parent 1cf57009d1
commit 8aee410046
3 changed files with 10 additions and 5 deletions

View File

@ -1,8 +1,8 @@
use crate::helpers::{rotating_color, ID};
use crate::helpers::ID;
use crate::render::{
DrawCtx, DrawOptions, Renderable, EXTRA_SHAPE_POINT_RADIUS, EXTRA_SHAPE_THICKNESS,
};
use ezgui::GfxCtx;
use ezgui::{Color, GfxCtx};
use geom::{Circle, FindClosest, GPSBounds, PolyLine, Polygon, Pt2D};
use kml::ExtraShape;
use map_model::{DirectedRoadID, Map, LANE_THICKNESS};
@ -79,10 +79,10 @@ impl Renderable for DrawExtraShape {
ID::ExtraShape(self.id)
}
fn draw(&self, g: &mut GfxCtx, opts: &DrawOptions, _: &DrawCtx) {
fn draw(&self, g: &mut GfxCtx, opts: &DrawOptions, ctx: &DrawCtx) {
let color = opts
.color(self.get_id())
.unwrap_or_else(|| rotating_color(self.id.0));
.unwrap_or_else(|| ctx.cs.get_def("extra shape", Color::RED.alpha(0.5)));
g.draw_polygon(color, &self.polygon);
}

View File

@ -33,7 +33,7 @@ use std::collections::HashMap;
pub const MIN_ZOOM_FOR_DETAIL: f64 = 1.0;
const EXTRA_SHAPE_THICKNESS: Distance = Distance::const_meters(1.0);
const EXTRA_SHAPE_POINT_RADIUS: Distance = Distance::const_meters(1.0);
const EXTRA_SHAPE_POINT_RADIUS: Distance = Distance::const_meters(10.0);
const BIG_ARROW_THICKNESS: Distance = Distance::const_meters(0.5);

View File

@ -79,6 +79,11 @@ if [ ! -f data/input/commute_mode.kml ]; then
get_if_needed https://www.arcgis.com/sharing/rest/content/items/1da9717ca5ff4505826aba40a7ac0a58/info/metadata/metadata.xml data/input/commute_mode.xml;
fi
if [ ! -f data/input/offstreet_parking.kml ]; then
# From https://data.seattle.gov/Transportation/Public-Garages-or-Parking-Lots/xefx-khzm
get_if_needed http://data-seattlecitygis.opendata.arcgis.com/datasets/8e52dfde6d5d45948f7a90654c8d50cd_0.kml data/input/offstreet_parking.kml;
fi
cd convert_osm
for poly in `ls ../data/polygons/`; do
name=`basename -s .poly $poly`;