mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 23:15:24 +03:00
draw islands. in particular, harbord island!
This commit is contained in:
parent
7a7f6f25d9
commit
490df9675c
@ -363,12 +363,16 @@ pub fn extract_osm(
|
||||
for polygon in glue_multipolygon(-1, coastline_groups, &boundary) {
|
||||
let mut osm_tags = BTreeMap::new();
|
||||
osm_tags.insert("water".to_string(), "ocean".to_string());
|
||||
map.areas.push(RawArea {
|
||||
area_type: AreaType::Water,
|
||||
osm_id: -1,
|
||||
polygon,
|
||||
osm_tags,
|
||||
});
|
||||
// Put it at the beginning, so that it's naturally beneath island areas
|
||||
map.areas.insert(
|
||||
0,
|
||||
RawArea {
|
||||
area_type: AreaType::Water,
|
||||
osm_id: -1,
|
||||
polygon,
|
||||
osm_tags,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
(
|
||||
@ -464,6 +468,9 @@ fn get_area_type(tags: &BTreeMap<String, String>) -> Option<AreaType> {
|
||||
if tags.get("natural") == Some(&"water".to_string()) {
|
||||
return Some(AreaType::Water);
|
||||
}
|
||||
if tags.get("place") == Some(&"island".to_string()) {
|
||||
return Some(AreaType::Island);
|
||||
}
|
||||
// TODO These just cover up poorly inferred road geometry now. Figure out how to use these.
|
||||
if false {
|
||||
if tags.get("traffic_calming") == Some(&"island".to_string()) {
|
||||
|
@ -2,18 +2,18 @@ data/input/austin/osm/Austin.osm,7c8d72cf97072af34cee665006b1e9e6,https://www.dr
|
||||
data/input/austin/osm/downtown_atx.osm,a30b0f460a481598e494f16a9d07a822,https://www.dropbox.com/s/8qodpqdn1pedzva/downtown_atx.osm.zip?dl=0
|
||||
data/input/austin/osm/huge_austin.osm,fb166029fc8006bd20dc959fbbbde3b6,https://www.dropbox.com/s/4bbsfpsg48dctje/huge_austin.osm.zip?dl=0
|
||||
data/input/raw_maps/23rd.bin,098bf70ed90cb568c5c5ae53096d4e2a,https://www.dropbox.com/s/9g5589k9swdln9y/23rd.bin.zip?dl=0
|
||||
data/input/raw_maps/ballard.bin,9086fad7da1f2574552e2d582ca53041,https://www.dropbox.com/s/wus0ufcnjyvcsuy/ballard.bin.zip?dl=0
|
||||
data/input/raw_maps/ballard.bin,96f39c70832a3e7e6000b99d3c5cf9c1,https://www.dropbox.com/s/wus0ufcnjyvcsuy/ballard.bin.zip?dl=0
|
||||
data/input/raw_maps/caphill.bin,e9d0a1250d98ae3ede47936a90ba0c3b,https://www.dropbox.com/s/vybo4owf8pzuita/caphill.bin.zip?dl=0
|
||||
data/input/raw_maps/downtown.bin,7a34a1d0a793e308268fb667f4199526,https://www.dropbox.com/s/ntqzttf25037fty/downtown.bin.zip?dl=0
|
||||
data/input/raw_maps/downtown.bin,2aaae842050d47e554530e4ff0272a87,https://www.dropbox.com/s/ntqzttf25037fty/downtown.bin.zip?dl=0
|
||||
data/input/raw_maps/downtown_atx.bin,c2564782f1c84b288b03cd2cdfdb9f29,https://www.dropbox.com/s/0cs55y1jcmm2alk/downtown_atx.bin.zip?dl=0
|
||||
data/input/raw_maps/huge_austin.bin,1f6acc02f700b30c2eb424c32bf29be9,https://www.dropbox.com/s/we0765ym7dlcsl1/huge_austin.bin.zip?dl=0
|
||||
data/input/raw_maps/huge_seattle.bin,b0ecce89df20e868f42f45c19c8651a9,https://www.dropbox.com/s/jcssts861uaovva/huge_seattle.bin.zip?dl=0
|
||||
data/input/raw_maps/intl_district.bin,7cea6764417acb52bb0611c39f1c5c25,https://www.dropbox.com/s/yopzq58r9t4y93v/intl_district.bin.zip?dl=0
|
||||
data/input/raw_maps/huge_seattle.bin,a94dd2fe677f071b880e1d536e3e35d8,https://www.dropbox.com/s/jcssts861uaovva/huge_seattle.bin.zip?dl=0
|
||||
data/input/raw_maps/intl_district.bin,a200e0df207532595e591e447511a050,https://www.dropbox.com/s/yopzq58r9t4y93v/intl_district.bin.zip?dl=0
|
||||
data/input/raw_maps/lakeslice.bin,c61311bceb2c25825613fedb56b64eb4,https://www.dropbox.com/s/4nmdtw0mgqe7tyg/lakeslice.bin.zip?dl=0
|
||||
data/input/raw_maps/montlake.bin,06378bb64499d26e314bd06c77bda7f8,https://www.dropbox.com/s/qk8rhwr6vdm79vz/montlake.bin.zip?dl=0
|
||||
data/input/raw_maps/mt_baker.bin,cc4a24a09f85681e8bf058619b156414,https://www.dropbox.com/s/nr18iu83lrcyg8e/mt_baker.bin.zip?dl=0
|
||||
data/input/raw_maps/udistrict.bin,71a6611f0d1a1e71d81c3c5bef238793,https://www.dropbox.com/s/o1gtavxtw8n3bhy/udistrict.bin.zip?dl=0
|
||||
data/input/raw_maps/west_seattle.bin,acf89282bf0d71b952765ce6dcdece28,https://www.dropbox.com/s/112ym2cwg643c9n/west_seattle.bin.zip?dl=0
|
||||
data/input/raw_maps/west_seattle.bin,b66a438291977976a7cd1504619323d8,https://www.dropbox.com/s/112ym2cwg643c9n/west_seattle.bin.zip?dl=0
|
||||
data/input/screenshots/lakeslice/01x01_i325.gif,7e083a5542792bb82f08c2a15492ccc1,https://www.dropbox.com/s/uiodmxawv8sheb1/01x01_i325.gif.zip?dl=0
|
||||
data/input/screenshots/lakeslice/01x02_i163.gif,2ee3c474b64d498b89df3c800363c8a6,https://www.dropbox.com/s/6zebcdhbeirab49/01x02_i163.gif.zip?dl=0
|
||||
data/input/screenshots/lakeslice/01x03_i1.gif,206a663a9dc054ed504daa4c8215b3a1,https://www.dropbox.com/s/qn65mm834k8w1jr/01x03_i1.gif.zip?dl=0
|
||||
@ -185,18 +185,18 @@ data/input/seattle/sidewalks.bin,034dd47ab77902dbc81c0107f13d8965,https://www.dr
|
||||
data/input/seattle/sidewalks.kml,94d385ba03ef1b57a5ba10965913ec6c,https://www.dropbox.com/s/vn8amar9xi6vbvh/sidewalks.kml.zip?dl=0
|
||||
data/input/seattle/trips_2014.csv,d4a8e733045b28c0385fb81359d6df03,https://www.dropbox.com/s/5ppravwmk6bf20d/trips_2014.csv.zip?dl=0
|
||||
data/system/maps/23rd.bin,0e05d1935223cbe87a16055d9d6c62c7,https://www.dropbox.com/s/wjl45codk6rqfg4/23rd.bin.zip?dl=0
|
||||
data/system/maps/ballard.bin,bf6e3e68452c13aa8a7e732ebb74eb6b,https://www.dropbox.com/s/u4rvz50she3yrk0/ballard.bin.zip?dl=0
|
||||
data/system/maps/ballard.bin,78f7686043228567ebccf080d8b12b97,https://www.dropbox.com/s/u4rvz50she3yrk0/ballard.bin.zip?dl=0
|
||||
data/system/maps/caphill.bin,f462b8b051d682127f36573bb8708bf8,https://www.dropbox.com/s/bh20pn3wxygetw8/caphill.bin.zip?dl=0
|
||||
data/system/maps/downtown.bin,a9d472fed26da1d6c67d42204d29332f,https://www.dropbox.com/s/4do5cg4vc17lafo/downtown.bin.zip?dl=0
|
||||
data/system/maps/downtown.bin,bc2313985293c284893ce4997a892d82,https://www.dropbox.com/s/4do5cg4vc17lafo/downtown.bin.zip?dl=0
|
||||
data/system/maps/downtown_atx.bin,0902409dad2c3f933027ae3651936254,https://www.dropbox.com/s/5avnbkd4oxby2hs/downtown_atx.bin.zip?dl=0
|
||||
data/system/maps/huge_austin.bin,6a891b6a7597fd7f44e0229dd002773a,https://www.dropbox.com/s/khy0m6v9yt0gjnt/huge_austin.bin.zip?dl=0
|
||||
data/system/maps/huge_seattle.bin,3bf3f468f614651982a19a82976e1587,https://www.dropbox.com/s/btvr3qajshnivhb/huge_seattle.bin.zip?dl=0
|
||||
data/system/maps/intl_district.bin,bced9bc5547f6c910dd90f85d2ae8796,https://www.dropbox.com/s/fohppni52ekc5l3/intl_district.bin.zip?dl=0
|
||||
data/system/maps/huge_seattle.bin,36bcaee8c58817b60f32acc30bff810e,https://www.dropbox.com/s/btvr3qajshnivhb/huge_seattle.bin.zip?dl=0
|
||||
data/system/maps/intl_district.bin,a2e1409130652735dfdb540969adb739,https://www.dropbox.com/s/fohppni52ekc5l3/intl_district.bin.zip?dl=0
|
||||
data/system/maps/lakeslice.bin,10022c1dab2c88c62cf7f9cd05872e6c,https://www.dropbox.com/s/99zi0gcbyvqrkud/lakeslice.bin.zip?dl=0
|
||||
data/system/maps/montlake.bin,519a2c9e557927ac1717932d0c7ecaf2,https://www.dropbox.com/s/zvhm2j5lavixxcr/montlake.bin.zip?dl=0
|
||||
data/system/maps/mt_baker.bin,ca9e1ee5024745f3b3294334a2ed15fb,https://www.dropbox.com/s/cetje663p04cbgp/mt_baker.bin.zip?dl=0
|
||||
data/system/maps/udistrict.bin,a1667bc29105c8b3095cddc92e403afd,https://www.dropbox.com/s/zqt2je8fadssz5j/udistrict.bin.zip?dl=0
|
||||
data/system/maps/west_seattle.bin,a169d8a2d5180444d88f96c365868e57,https://www.dropbox.com/s/5pp1ik9l40yj3wh/west_seattle.bin.zip?dl=0
|
||||
data/system/maps/west_seattle.bin,1f345dab13681f761e9ed72e09b13257,https://www.dropbox.com/s/5pp1ik9l40yj3wh/west_seattle.bin.zip?dl=0
|
||||
data/system/prebaked_results/23rd/weekday.bin,4fb299306c94a1294550c665ff28ad3a,https://www.dropbox.com/s/s4htwmbfcwymazc/weekday.bin.zip?dl=0
|
||||
data/system/prebaked_results/lakeslice/weekday.bin,fc1720e6b5e2171ebe165c3e2ca68e80,https://www.dropbox.com/s/1c1sohvy50263wg/weekday.bin.zip?dl=0
|
||||
data/system/prebaked_results/montlake/car vs bike contention.bin,b10a422ce1f1f51c43375364d6b0e1f8,https://www.dropbox.com/s/jefg0ikjy9dsrdd/car%20vs%20bike%20contention.bin.zip?dl=0
|
||||
|
@ -16,6 +16,7 @@ impl DrawArea {
|
||||
AreaType::Park => cs.grass,
|
||||
AreaType::Water => cs.water,
|
||||
AreaType::PedestrianIsland => Color::grey(0.3),
|
||||
AreaType::Island => cs.map_background,
|
||||
};
|
||||
all_areas.push(color, area.polygon.clone());
|
||||
DrawArea { id: area.id }
|
||||
|
@ -18,6 +18,7 @@ pub enum AreaType {
|
||||
Park,
|
||||
Water,
|
||||
PedestrianIsland,
|
||||
Island,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
Loading…
Reference in New Issue
Block a user