Struct geom::Ring [−][src]
Expand description
Maybe a misnomer, but like a PolyLine, but closed.
Fields
pts: Vec<Pt2D>
Implementations
Draws the ring with some thickness, with half of it straddling the interor of the ring, and half on the outside.
pub fn into_points(self) -> Vec<Pt2D>ⓘ
Be careful with the order of results. Hits on an earlier line segment of other show up first, but if the ring hits a line segment at multiple points, who knows. Dedupes.
Assuming both points are somewhere along the ring, return the points in between the two, by
tracing along the ring in the longer or shorter direction (depending on longer
). If both
points are the same, returns None
. The result is oriented from pt1
to pt2
.
Assuming both points are somewhere along the ring, return the points in between the two, by
tracing along the ring in the shorter direction. If both points are the same, returns
None
. The result is oriented from pt1
to pt2
.
Extract all PolyLines and Rings. Doesn’t handle crazy double loops and stuff.
Produces a GeoJSON polygon, optionally mapping the world-space points back to GPS.
Find the “pole of inaccessibility” – the most distant internal point from the polygon outline
Look for “bad” rings that double back on themselves. These’re likely to cause many downstream problems. “Bad” means the order of points doesn’t match the order when sorting by angle from the center.
TODO I spot many false positives. Look for better definitions – maybe self-intersecting polygons?
Print the coordinates of this ring as a geo::LineString
for easy bug reports
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Ring
impl UnwindSafe for Ring
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self