<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `geom` crate."><metaname="keywords"content="rust, rustlang, rust-lang, geom"><title>geom - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptdefersrc="../crates.js"></script><scriptdefersrc="../main.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../favicon.svg"></head><bodyclass="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../geom/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../geom/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"><ahref="#">Crate geom</a></h2><divclass="sidebar-elems"><divclass="block"><ul><liclass="version">Version 0.1.0</li><li><aid="all-types"href="all.html">All Items</a></li></ul></div><section><divclass="block"><ul><li><ahref="#modules">Modules</a></li><li><ahref="#structs">Structs</a></li><li><ahref="#enums">Enums</a></li><li><ahref="#constants">Constants</a></li><li><ahref="#traits">Traits</a></li><li><ahref="#functions">Functions</a></li></ul></div></section></div></nav><main><divclass="width-limiter"><divclass="sub-container"><aclass="sub-logo-container"href="../geom/index.html"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></a><navclass="sub"><formclass="search-form"><divclass="search-container"><span></span><inputclass="search-input"name="search"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"title="help"tabindex="-1"><buttontype="button">?</button></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../wheel.svg"></a></div></div></form></nav></div><sectionid="main-content"class="content"><divclass="main-heading"><h1class="fqn"><spanclass="in-band">Crate <aclass="mod"href="#">geom</a><buttonid="copy-path"onclick="copy_path(this)"title="Copy item path to clipboard"><imgsrc="../clipboard.svg"width="19"height="18"alt="Copy item path"></button></span></h1><spanclass="out-of-band"><aclass="srclink"href="../src/geom/lib.rs.html#1-196">source</a> · <aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass="inner">−</span>]</a></span></div><h2id="modules"class="smal
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Bounds.html"title="geom::Bounds struct">Bounds</a></div><divclass="item-right docblock-short"><p>Represents a rectangular boundary of <code>Pt2D</code> points.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Circle.html"title="geom::Circle struct">Circle</a></div><divclass="item-right docblock-short"><p>A circle, defined by a center and radius.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.CornerRadii.html"title="geom::CornerRadii struct">CornerRadii</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Distance.html"title="geom::Distance struct">Distance</a></div><divclass="item-right docblock-short"><p>A distance, in meters. Can be negative.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Duration.html"title="geom::Duration struct">Duration</a></div><divclass="item-right docblock-short"><p>A duration, in seconds. Can be negative.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.FindClosest.html"title="geom::FindClosest struct">FindClosest</a></div><divclass="item-right docblock-short"><p>A quad-tree to quickly find the closest points to some polylines.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.GPSBounds.html"title="geom::GPSBounds struct">GPSBounds</a></div><divclass="item-right docblock-short"><p>Represents a rectangular boundary of <code>LonLat</code> points. After building one of these, <code>LonLat</code>s
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.HashablePt2D.html"title="geom::HashablePt2D struct">HashablePt2D</a></div><divclass="item-right docblock-short"><p>This represents world space, NOT LonLat.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.LonLat.html"title="geom::LonLat struct">LonLat</a></div><divclass="item-right docblock-short"><p>Represents a (longitude, latitude) point.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Percent.html"title="geom::Percent struct">Percent</a></div><divclass="item-right docblock-short"><p>Most of the time, [0, 1]. But some callers may go outside this range.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Ring.html"title="geom::Ring struct">Ring</a></div><divclass="item-right docblock-short"><p>Maybe a misnomer, but like a PolyLine, but closed.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Speed.html"title="geom::Speed struct">Speed</a></div><divclass="item-right docblock-short"><p>In meters per second. Can be negative.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Time.html"title="geom::Time struct">Time</a></div><divclass="item-right docblock-short"><p>In seconds since midnight. Can’t be negative.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.Triangle.html"title="geom::Triangle struct">Triangle</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="struct"href="struct.UnitFmt.html"title="geom::UnitFmt struct">UnitFmt</a></div><divclass="item-right docblock-short"><p>Specifies how to stringify different geom objects.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.geometries_to_geojson.html"title="geom::geometries_to_geojson fn">geometries_to_geojson</a></div><divclass="item-right docblock-short"><p>Create a GeoJson with one feature per geometry, and no properties.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.geometries_with_properties_to_geojson.html"title="geom::geometries_with_properties_to_geojson fn">geometries_with_properties_to_geojson</a></div><divclass="item-right docblock-short"><p>Create a GeoJson with one feature per geometry, with the specified properties.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.serialize_f64.html"title="geom::serialize_f64 fn">serialize_f64</a><spantitle="Restricted Visibility"> 🔒</span></div><divclass="item-right docblock-short"><p>Serializes a trimmed <code>f64</code> as an <code>i32</code> to save space.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="fn"href="fn.trim_f64.html"title="geom::trim_f64 fn">trim_f64</a></div><divclass="item-right docblock-short"><p>Reduce the precision of an f64. This helps ensure serialization is idempotent (everything is