This commit is contained in:
dabreegster 2020-11-14 00:49:26 +00:00
parent 74f6c340ed
commit 25ef532f60
25 changed files with 99 additions and 65 deletions

View File

@ -181,9 +181,9 @@ invert.</p>
<a href="https://download.bbbike.org/">https://download.bbbike.org/</a> or <a href="http://download.geofabrik.de/index.html">http://download.geofabrik.de/index.html</a>,
then clip them to a smaller area. Use <a href="http://geojson.io/">geojson.io</a> or
<a href="https://geoman.io/geojson-editor">geoman.io</a> to draw a boundary around the
region you want to simulate and save the geojson locally. Use
<code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson &gt; clipping.poly</code> to
convert that geojson to the
region you want to simulate and save the GeoJSON locally. Use
<code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson</code> to convert that GeoJSON
to the
<a href="https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format">Osmosis format</a>
required by osmconvert.</p>
<p>Note that you may hit problems if you use JOSM to download additional data to a
@ -208,11 +208,13 @@ osmconvert, gdal, etc.</p>
region you want to simulate and save the geojson locally.</p>
</li>
<li>
<p>Use
<code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson &gt; importer/config/your_city/region_name.poly</code>
to convert that geojson to the
<p>Use <code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson</code> to convert that
geojson to the
<a href="https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format">Osmosis format</a>
required by osmconvert.</p>
required by osmconvert. This tool writes one file per feature in the input,
so you'd then
<code>mv boundary0.poly importer/config/your_city/region_name.poly</code>, repeating if
you drew multiple polygons.</p>
</li>
<li>
<p>Copy <code>importer/config/tel_aviv/cfg.json</code> to

View File

@ -334,9 +334,9 @@ invert.</p>
<a href="https://download.bbbike.org/">https://download.bbbike.org/</a> or <a href="http://download.geofabrik.de/index.html">http://download.geofabrik.de/index.html</a>,
then clip them to a smaller area. Use <a href="http://geojson.io/">geojson.io</a> or
<a href="https://geoman.io/geojson-editor">geoman.io</a> to draw a boundary around the
region you want to simulate and save the geojson locally. Use
<code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson &gt; clipping.poly</code> to
convert that geojson to the
region you want to simulate and save the GeoJSON locally. Use
<code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson</code> to convert that GeoJSON
to the
<a href="https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format">Osmosis format</a>
required by osmconvert.</p>
<p>Note that you may hit problems if you use JOSM to download additional data to a
@ -361,11 +361,13 @@ osmconvert, gdal, etc.</p>
region you want to simulate and save the geojson locally.</p>
</li>
<li>
<p>Use
<code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson &gt; importer/config/your_city/region_name.poly</code>
to convert that geojson to the
<p>Use <code>cargo run --bin geojson_to_osmosis &lt; boundary.geojson</code> to convert that
geojson to the
<a href="https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format">Osmosis format</a>
required by osmconvert.</p>
required by osmconvert. This tool writes one file per feature in the input,
so you'd then
<code>mv boundary0.poly importer/config/your_city/region_name.poly</code>, repeating if
you drew multiple polygons.</p>
</li>
<li>
<p>Copy <code>importer/config/tel_aviv/cfg.json</code> to

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `extract_osm` fn in crate `convert_osm`."><meta name="keywords" content="rust, rustlang, rust-lang, extract_osm"><title>convert_osm::extract::extract_osm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../convert_osm/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a></p><script>window.sidebarCurrent = {name: 'extract_osm', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#28-376' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>extract_osm</a></span></h1><pre class='rust fn'>pub fn extract_osm(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;mut <a class="struct" href="../../map_model/raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;opts: &amp;<a class="struct" href="../../convert_osm/struct.Options.html" title="struct convert_osm::Options">Options</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="../../convert_osm/extract/struct.OsmExtract.html" title="struct convert_osm::extract::OsmExtract">OsmExtract</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#28-378' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>extract_osm</a></span></h1><pre class='rust fn'>pub fn extract_osm(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;mut <a class="struct" href="../../map_model/raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;opts: &amp;<a class="struct" href="../../convert_osm/struct.Options.html" title="struct convert_osm::Options">Options</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="../../convert_osm/extract/struct.OsmExtract.html" title="struct convert_osm::extract::OsmExtract">OsmExtract</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `get_area_type` fn in crate `convert_osm`."><meta name="keywords" content="rust, rustlang, rust-lang, get_area_type"><title>convert_osm::extract::get_area_type - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../convert_osm/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a></p><script>window.sidebarCurrent = {name: 'get_area_type', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#518-540' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>get_area_type</a></span></h1><pre class='rust fn'>fn get_area_type(tags: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../map_model/objects/area/enum.AreaType.html" title="enum map_model::objects::area::AreaType">AreaType</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#520-542' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>get_area_type</a></span></h1><pre class='rust fn'>fn get_area_type(tags: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../map_model/objects/area/enum.AreaType.html" title="enum map_model::objects::area::AreaType">AreaType</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `get_bldg_amenities` fn in crate `convert_osm`."><meta name="keywords" content="rust, rustlang, rust-lang, get_bldg_amenities"><title>convert_osm::extract::get_bldg_amenities - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../convert_osm/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a></p><script>window.sidebarCurrent = {name: 'get_bldg_amenities', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#504-516' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>get_bldg_amenities</a></span></h1><pre class='rust fn'>fn get_bldg_amenities(tags: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../map_model/objects/building/struct.Amenity.html" title="struct map_model::objects::building::Amenity">Amenity</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#506-518' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>get_bldg_amenities</a></span></h1><pre class='rust fn'>fn get_bldg_amenities(tags: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../map_model/objects/building/struct.Amenity.html" title="struct map_model::objects::building::Amenity">Amenity</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `is_bldg` fn in crate `convert_osm`."><meta name="keywords" content="rust, rustlang, rust-lang, is_bldg"><title>convert_osm::extract::is_bldg - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../convert_osm/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a></p><script>window.sidebarCurrent = {name: 'is_bldg', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#499-502' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>is_bldg</a></span></h1><pre class='rust fn'>fn is_bldg(tags: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#501-504' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>is_bldg</a></span></h1><pre class='rust fn'>fn is_bldg(tags: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `is_road` fn in crate `convert_osm`."><meta name="keywords" content="rust, rustlang, rust-lang, is_road"><title>convert_osm::extract::is_road - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../convert_osm/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a></p><script>window.sidebarCurrent = {name: 'is_road', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#378-497' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>is_road</a></span></h1><pre class='rust fn'>fn is_road(tags: &amp;mut <a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>, opts: &amp;<a class="struct" href="../../convert_osm/struct.Options.html" title="struct convert_osm::Options">Options</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#380-499' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>convert_osm</a>::<wbr><a href='index.html'>extract</a>::<wbr><a class="fn" href=''>is_road</a></span></h1><pre class='rust fn'>fn is_road(tags: &amp;mut <a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>, opts: &amp;<a class="struct" href="../../convert_osm/struct.Options.html" title="struct convert_osm::Options">Options</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `extract` mod in crate `convert_osm`."><meta name="keywords" content="rust, rustlang, rust-lang, extract"><title>convert_osm::extract - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../convert_osm/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module extract</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>convert_osm</a></p><script>window.sidebarCurrent = {name: 'extract', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#1-540' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>convert_osm</a>::<wbr><a class="mod" href=''>extract</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/convert_osm/extract.rs.html#1-542' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>convert_osm</a>::<wbr><a class="mod" href=''>extract</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.OsmExtract.html" title='convert_osm::extract::OsmExtract struct'>OsmExtract</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.extract_osm.html" title='convert_osm::extract::extract_osm fn'>extract_osm</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.get_area_type.html" title='convert_osm::extract::get_area_type fn'>get_area_type</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.get_bldg_amenities.html" title='convert_osm::extract::get_bldg_amenities fn'>get_bldg_amenities</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.is_bldg.html" title='convert_osm::extract::is_bldg fn'>is_bldg</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.is_road.html" title='convert_osm::extract::is_road fn'>is_road</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "convert_osm";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-26b47b6c62d293fe/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Fri, 13 Nov 2020 06:15:17 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-26b47b6c62d293fe/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sat, 14 Nov 2020 00:46:52 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geojson_to_osmosis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate geojson_to_osmosis</p><div class='block version'><p>Version 0.1.0</p></div><a id='all-types' href='index.html'><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span>
</span>
<span class='in-band'>List of all items</span></h1><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='fn.boundary_coords.html'>boundary_coords</a></li><li><a href='fn.main.html'>main</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "geojson_to_osmosis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
<span class='in-band'>List of all items</span></h1><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='fn.extract_boundaries.html'>extract_boundaries</a></li><li><a href='fn.main.html'>main</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "geojson_to_osmosis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `boundary_coords` fn in crate `geojson_to_osmosis`."><meta name="keywords" content="rust, rustlang, rust-lang, boundary_coords"><title>geojson_to_osmosis::boundary_coords - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geojson_to_osmosis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>geojson_to_osmosis</a></p><script>window.sidebarCurrent = {name: 'boundary_coords', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/geojson_to_osmosis/geojson_to_osmosis.rs.html#26-38' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>geojson_to_osmosis</a>::<wbr><a class="fn" href=''>boundary_coords</a></span></h1><pre class='rust fn'>fn boundary_coords(geojson: &amp;GeoJson) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "geojson_to_osmosis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `extract_boundaries` fn in crate `geojson_to_osmosis`."><meta name="keywords" content="rust, rustlang, rust-lang, extract_boundaries"><title>geojson_to_osmosis::extract_boundaries - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geojson_to_osmosis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>geojson_to_osmosis</a></p><script>window.sidebarCurrent = {name: 'extract_boundaries', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/geojson_to_osmosis/geojson_to_osmosis.rs.html#23-46' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>geojson_to_osmosis</a>::<wbr><a class="fn" href=''>extract_boundaries</a></span></h1><pre class='rust fn'>fn extract_boundaries(<br>&nbsp;&nbsp;&nbsp;&nbsp;geojson: GeoJson<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/gps/struct.LonLat.html" title="struct geom::gps::LonLat">LonLat</a>&gt;&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "geojson_to_osmosis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -1,6 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `main` fn in crate `geojson_to_osmosis`."><meta name="keywords" content="rust, rustlang, rust-lang, main"><title>geojson_to_osmosis::main - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geojson_to_osmosis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>geojson_to_osmosis</a></p><script>window.sidebarCurrent = {name: 'main', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/geojson_to_osmosis/geojson_to_osmosis.rs.html#10-24' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>geojson_to_osmosis</a>::<wbr><a class="fn" href=''>main</a></span></h1><pre class='rust fn'>fn main() -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>&gt;&gt;</pre><div class='docblock'><p>Convert geojson boundary suitable for osmfilter and other osmosis based tools.
Expects the input to contain no element other than the boundary of interest.
Reads geojson text from stdin
Writes &quot;poly&quot; formatted text to stdout</p>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/geojson_to_osmosis/geojson_to_osmosis.rs.html#10-21' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='index.html'>geojson_to_osmosis</a>::<wbr><a class="fn" href=''>main</a></span></h1><pre class='rust fn'>fn main() -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>&gt;&gt;</pre><div class='docblock'><p>Reads GeoJSON input from STDIN, extracts a polygon from every feature, and writes numbered
files in the https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format format as
output.</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "geojson_to_osmosis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -1,7 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `geojson_to_osmosis` crate."><meta name="keywords" content="rust, rustlang, rust-lang, geojson_to_osmosis"><title>geojson_to_osmosis - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geojson_to_osmosis/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate geojson_to_osmosis</p><div class='block version'><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all geojson_to_osmosis's items</p></a><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'geojson_to_osmosis', ty: 'mod', relpath: '../'};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/geojson_to_osmosis/geojson_to_osmosis.rs.html#1-38' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>geojson_to_osmosis</a></span></h1><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.boundary_coords.html" title='geojson_to_osmosis::boundary_coords fn'>boundary_coords</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.main.html" title='geojson_to_osmosis::main fn'>main</a></td><td class='docblock-short'><p>Convert geojson boundary suitable for osmfilter and other osmosis based tools.
Expects the input to contain no element other than the boundary of interest.
Reads geojson text from stdin
Writes &quot;poly&quot; formatted text to stdout</p>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/geojson_to_osmosis/geojson_to_osmosis.rs.html#1-46' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>geojson_to_osmosis</a></span></h1><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.extract_boundaries.html" title='geojson_to_osmosis::extract_boundaries fn'>extract_boundaries</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.main.html" title='geojson_to_osmosis::main fn'>main</a></td><td class='docblock-short'><p>Reads GeoJSON input from STDIN, extracts a polygon from every feature, and writes numbered
files in the https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format format as
output.</p>
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "geojson_to_osmosis";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["boundary_coords",""],["main","Convert geojson boundary suitable for osmfilter and other osmosis based tools. Expects the input to contain no element other than the boundary of interest. Reads geojson text from stdin Writes \"poly\" formatted text to stdout"]]});
initSidebarItems({"fn":[["extract_boundaries",""],["main","Reads GeoJSON input from STDIN, extracts a polygon from every feature, and writes numbered files in the https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format format as output."]]});

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `match_points_to_lanes` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, match_points_to_lanes"><title>map_model::make::match_points_to_lanes - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>map_model</a>::<wbr><a href='index.html'>make</a></p><script>window.sidebarCurrent = {name: 'match_points_to_lanes', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/map_model/make/mod.rs.html#345-398' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>map_model</a>::<wbr><a href='index.html'>make</a>::<wbr><a class="fn" href=''>match_points_to_lanes</a></span></h1><pre class='rust fn'>fn match_points_to_lanes&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;<a class="struct" href="../../map_model/struct.Lane.html" title="struct map_model::Lane">Lane</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;bounds: &amp;<a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;pts: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../geom/pt/struct.HashablePt2D.html" title="struct geom::pt::HashablePt2D">HashablePt2D</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;lanes: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../map_model/struct.Lane.html" title="struct map_model::Lane">Lane</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;filter: F, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer: <a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;max_dist_away: <a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;<a class="struct" href="../../geom/pt/struct.HashablePt2D.html" title="struct geom::pt::HashablePt2D">HashablePt2D</a>, <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a>&gt;</pre><div class='docblock'><p>Snap points to an exact Position along the nearest lane. If the result doesn't contain a
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/map_model/make/mod.rs.html#351-404' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>map_model</a>::<wbr><a href='index.html'>make</a>::<wbr><a class="fn" href=''>match_points_to_lanes</a></span></h1><pre class='rust fn'>fn match_points_to_lanes&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;<a class="struct" href="../../map_model/struct.Lane.html" title="struct map_model::Lane">Lane</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;bounds: &amp;<a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;pts: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;<a class="struct" href="../../geom/pt/struct.HashablePt2D.html" title="struct geom::pt::HashablePt2D">HashablePt2D</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;lanes: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../map_model/struct.Lane.html" title="struct map_model::Lane">Lane</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;filter: F, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer: <a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;max_dist_away: <a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;<a class="struct" href="../../geom/pt/struct.HashablePt2D.html" title="struct geom::pt::HashablePt2D">HashablePt2D</a>, <a class="struct" href="../../map_model/struct.Position.html" title="struct map_model::Position">Position</a>&gt;</pre><div class='docblock'><p>Snap points to an exact Position along the nearest lane. If the result doesn't contain a
requested point, then there was no matching lane close enough.</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_model";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, make"><title>map_model::make - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module make</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>map_model</a></p><script>window.sidebarCurrent = {name: 'make', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/map_model/make/mod.rs.html#1-398' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_model</a>::<wbr><a class="mod" href=''>make</a></span></h1><div class='docblock'><p>See <a href="https://dabreegster.github.io/abstreet/map/importing/index.html">https://dabreegster.github.io/abstreet/map/importing/index.html</a> for an overview. This module
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/map_model/make/mod.rs.html#1-404' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_model</a>::<wbr><a class="mod" href=''>make</a></span></h1><div class='docblock'><p>See <a href="https://dabreegster.github.io/abstreet/map/importing/index.html">https://dabreegster.github.io/abstreet/map/importing/index.html</a> for an overview. This module
covers the RawMap-&gt;Map stage.</p>
</div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table><tr class='module-item'><td><a class="mod" href="bridges/index.html" title='map_model::make::bridges mod'>bridges</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="buildings/index.html" title='map_model::make::buildings mod'>buildings</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="initial/index.html" title='map_model::make::initial mod'>initial</a></td><td class='docblock-short'><p>Naming is confusing, but RawMap -&gt; InitialMap -&gt; Map. InitialMap is separate pretty much just

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -539,6 +539,8 @@
<span id="538">538</span>
<span id="539">539</span>
<span id="540">540</span>
<span id="541">541</span>
<span id="542">542</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">HashMap</span>};
@ -757,7 +759,9 @@
<span class="ident">via_node_id</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">n</span>);
}
}
<span class="kw">_</span> <span class="op">=&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),
<span class="ident">OsmID</span>::<span class="ident">Relation</span>(<span class="ident">r</span>) <span class="op">=&gt;</span> {
<span class="macro">warn</span><span class="macro">!</span>(<span class="string">&quot;{} contains {} as {}&quot;</span>, <span class="ident">id</span>, <span class="ident">r</span>, <span class="ident">role</span>);
}
}
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">restriction</span>) <span class="op">=</span> <span class="ident">rel</span>.<span class="ident">tags</span>.<span class="ident">get</span>(<span class="string">&quot;restriction&quot;</span>) {

View File

@ -112,7 +112,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.47.0 (18bf6b4f0 2020-10-07)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Fri, 13 Nov 2020 06:15:17 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 14 Nov 2020 00:46:52 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -37,44 +37,60 @@
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
<span id="41">41</span>
<span id="42">42</span>
<span id="43">43</span>
<span id="44">44</span>
<span id="45">45</span>
<span id="46">46</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::{<span class="self">self</span>, <span class="ident">Read</span>};
<span class="kw">use</span> <span class="ident">geojson</span>::{<span class="ident">GeoJson</span>, <span class="ident">Value</span>};
<span class="doccomment">/// Convert geojson boundary suitable for osmfilter and other osmosis based tools.</span>
<span class="doccomment">/// Expects the input to contain no element other than the boundary of interest.</span>
<span class="comment">//</span>
<span class="doccomment">/// Reads geojson text from stdin</span>
<span class="doccomment">/// Writes &quot;poly&quot; formatted text to stdout</span>
<span class="kw">use</span> <span class="ident">geom</span>::<span class="ident">LonLat</span>;
<span class="doccomment">/// Reads GeoJSON input from STDIN, extracts a polygon from every feature, and writes numbered</span>
<span class="doccomment">/// files in the https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format format as</span>
<span class="doccomment">/// output.</span>
<span class="kw">fn</span> <span class="ident">main</span>() <span class="op">-&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">std</span>::<span class="ident">error</span>::<span class="ident">Error</span><span class="op">&gt;&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buffer</span> <span class="op">=</span> <span class="ident">String</span>::<span class="ident">new</span>();
<span class="ident">io</span>::<span class="ident">stdin</span>().<span class="ident">read_to_string</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">buffer</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">buffer</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">GeoJson</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">points</span> <span class="op">=</span> <span class="ident">boundary_coords</span>(<span class="kw-2">&amp;</span><span class="ident">geojson</span>)<span class="question-mark">?</span>;
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;boundary&quot;</span>);
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;1&quot;</span>);
<span class="kw">for</span> <span class="ident">point</span> <span class="kw">in</span> <span class="ident">points</span> {
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot; {} {}&quot;</span>, <span class="ident">point</span>[<span class="number">0</span>], <span class="ident">point</span>[<span class="number">1</span>]);
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">points</span>) <span class="kw">in</span> <span class="ident">extract_boundaries</span>(<span class="ident">geojson</span>)<span class="question-mark">?</span>.<span class="ident">into_iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;boundary{}.poly&quot;</span>, <span class="ident">idx</span>);
<span class="ident">LonLat</span>::<span class="ident">write_osmosis_polygon</span>(<span class="kw-2">&amp;</span><span class="ident">path</span>, <span class="kw-2">&amp;</span><span class="ident">points</span>)<span class="question-mark">?</span>;
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Wrote {}&quot;</span>, <span class="ident">path</span>);
}
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;END&quot;</span>);
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;END&quot;</span>);
<span class="prelude-val">Ok</span>(())
}
<span class="kw">fn</span> <span class="ident">boundary_coords</span>(<span class="ident">geojson</span>: <span class="kw-2">&amp;</span><span class="ident">GeoJson</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">f64</span><span class="op">&gt;&gt;</span>, <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">std</span>::<span class="ident">error</span>::<span class="ident">Error</span><span class="op">&gt;&gt;</span> {
<span class="kw">let</span> <span class="ident">feature</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">geojson</span> {
<span class="ident">GeoJson</span>::<span class="ident">Feature</span>(<span class="ident">feature</span>) <span class="op">=&gt;</span> <span class="ident">feature</span>,
<span class="ident">GeoJson</span>::<span class="ident">FeatureCollection</span>(<span class="ident">feature_collection</span>) <span class="op">=&gt;</span> <span class="kw-2">&amp;</span><span class="ident">feature_collection</span>.<span class="ident">features</span>[<span class="number">0</span>],
<span class="kw">fn</span> <span class="ident">extract_boundaries</span>(<span class="ident">geojson</span>: <span class="ident">GeoJson</span>) <span class="op">-&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">LonLat</span><span class="op">&gt;&gt;</span>, <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">std</span>::<span class="ident">error</span>::<span class="ident">Error</span><span class="op">&gt;&gt;</span> {
<span class="kw">let</span> <span class="ident">features</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">geojson</span> {
<span class="ident">GeoJson</span>::<span class="ident">Feature</span>(<span class="ident">feature</span>) <span class="op">=&gt;</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="ident">feature</span>],
<span class="ident">GeoJson</span>::<span class="ident">FeatureCollection</span>(<span class="ident">feature_collection</span>) <span class="op">=&gt;</span> <span class="ident">feature_collection</span>.<span class="ident">features</span>,
<span class="kw">_</span> <span class="op">=&gt;</span> <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Unexpected geojson: {:?}&quot;</span>, <span class="ident">geojson</span>).<span class="ident">into</span>()),
};
<span class="kw">match</span> <span class="kw-2">&amp;</span><span class="ident">feature</span>.<span class="ident">geometry</span>.<span class="ident">as_ref</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="kw-2">&amp;</span><span class="ident">g</span>.<span class="ident">value</span>) {
<span class="prelude-val">Some</span>(<span class="ident">Value</span>::<span class="ident">MultiPolygon</span>(<span class="ident">multi_polygon</span>)) <span class="op">=&gt;</span> <span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="ident">multi_polygon</span>[<span class="number">0</span>][<span class="number">0</span>].<span class="ident">clone</span>()),
<span class="prelude-val">Some</span>(<span class="ident">Value</span>::<span class="ident">Polygon</span>(<span class="ident">polygon</span>)) <span class="op">=&gt;</span> <span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="ident">polygon</span>[<span class="number">0</span>].<span class="ident">clone</span>()),
<span class="kw">_</span> <span class="op">=&gt;</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Unexpected feature: {:?}&quot;</span>, <span class="ident">feature</span>).<span class="ident">into</span>()),
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">polygons</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="kw-2">mut</span> <span class="ident">feature</span> <span class="kw">in</span> <span class="ident">features</span> {
<span class="kw">let</span> <span class="ident">points</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">feature</span>.<span class="ident">geometry</span>.<span class="ident">take</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">g</span><span class="op">|</span> <span class="ident">g</span>.<span class="ident">value</span>) {
<span class="prelude-val">Some</span>(<span class="ident">Value</span>::<span class="ident">MultiPolygon</span>(<span class="ident">multi_polygon</span>)) <span class="op">=&gt;</span> <span class="ident">multi_polygon</span>[<span class="number">0</span>][<span class="number">0</span>].<span class="ident">clone</span>(),
<span class="prelude-val">Some</span>(<span class="ident">Value</span>::<span class="ident">Polygon</span>(<span class="ident">polygon</span>)) <span class="op">=&gt;</span> <span class="ident">polygon</span>[<span class="number">0</span>].<span class="ident">clone</span>(),
<span class="kw">_</span> <span class="op">=&gt;</span> {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Unexpected feature: {:?}&quot;</span>, <span class="ident">feature</span>).<span class="ident">into</span>());
}
};
<span class="ident">polygons</span>.<span class="ident">push</span>(
<span class="ident">points</span>
.<span class="ident">into_iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">pt</span><span class="op">|</span> <span class="ident">LonLat</span>::<span class="ident">new</span>(<span class="ident">pt</span>[<span class="number">0</span>], <span class="ident">pt</span>[<span class="number">1</span>]))
.<span class="ident">collect</span>(),
);
}
<span class="prelude-val">Ok</span>(<span class="ident">polygons</span>)
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geojson_to_osmosis";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -397,6 +397,12 @@
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
<span id="401">401</span>
<span id="402">402</span>
<span id="403">403</span>
<span id="404">404</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! See &lt;https://dabreegster.github.io/abstreet/map/importing/index.html&gt; for an overview. This module</span>
<span class="doccomment">//! covers the RawMap-&gt;Map stage.</span>
@ -532,8 +538,14 @@
<span class="ident">dst_i</span>: <span class="ident">i2</span>,
<span class="ident">speed_limit</span>: <span class="ident">Speed</span>::<span class="ident">ZERO</span>,
<span class="ident">zorder</span>: <span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">layer</span>) <span class="op">=</span> <span class="ident">raw</span>.<span class="ident">roads</span>[<span class="kw-2">&amp;</span><span class="ident">r</span>.<span class="ident">id</span>].<span class="ident">osm_tags</span>.<span class="ident">get</span>(<span class="string">&quot;layer&quot;</span>) {
<span class="comment">// Just drop .5 for now</span>
<span class="ident">layer</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">f64</span><span class="op">&gt;</span>().<span class="ident">unwrap</span>() <span class="kw">as</span> <span class="ident">isize</span>
<span class="kw">match</span> <span class="ident">layer</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">f64</span><span class="op">&gt;</span>() {
<span class="comment">// Just drop .5 for now</span>
<span class="prelude-val">Ok</span>(<span class="ident">l</span>) <span class="op">=&gt;</span> <span class="ident">l</span> <span class="kw">as</span> <span class="ident">isize</span>,
<span class="prelude-val">Err</span>(<span class="kw">_</span>) <span class="op">=&gt;</span> {
<span class="macro">warn</span><span class="macro">!</span>(<span class="string">&quot;Weird layer={} on {}&quot;</span>, <span class="ident">layer</span>, <span class="ident">r</span>.<span class="ident">id</span>);
<span class="number">0</span>
}
}
} <span class="kw">else</span> {
<span class="number">0</span>
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long