pub struct Geometry {
pub points: Vec<(i32, i32)>,
pub lines: Vec<Vec<(i32, i32)>>,
pub polygons: Vec<Polygon>,
}Expand description
Geometry in source-specific tile-local coordinates. For MVT this is
[0, extent] with y-down; for GeoJSON it’s whatever the caller
chose to project into before parsing.
All three layers (points / lines / polygons) co-exist on a single
feature. Single-vs-multi (Point vs MultiPoint, etc.) is
expressed by element count, and a GeoJSON GeometryCollection maps
onto whichever combination of the three vecs its children produce.
Fields§
§points: Vec<(i32, i32)>§lines: Vec<Vec<(i32, i32)>>§polygons: Vec<Polygon>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnsafeUnpin for Geometry
impl UnwindSafe for Geometry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more