pub enum GpkgGeometry {
Point {
x: f64,
y: f64,
},
LineString {
coords: Vec<(f64, f64)>,
},
Polygon {
rings: Vec<Vec<(f64, f64)>>,
},
MultiPoint {
points: Vec<(f64, f64)>,
},
MultiLineString {
lines: Vec<Vec<(f64, f64)>>,
},
MultiPolygon {
polygons: Vec<Vec<Vec<(f64, f64)>>>,
},
GeometryCollection(Vec<GpkgGeometry>),
Empty,
}Expand description
A decoded GeoPackage geometry value.
Coordinates are always (x, y) pairs — typically (longitude, latitude) for geographic SRSs or (easting, northing) for projected ones.
Variants§
Point
A single point.
LineString
An ordered sequence of points forming a line.
Polygon
A polygon defined by one exterior ring and zero or more interior rings.
Fields
MultiPoint
A collection of points.
MultiLineString
A collection of line strings.
MultiPolygon
A collection of polygons.
GeometryCollection(Vec<GpkgGeometry>)
A heterogeneous collection of geometries.
Empty
An explicitly empty geometry (GeoPackage envelope-indicator = 0, empty flag set).
Implementations§
Source§impl GpkgGeometry
impl GpkgGeometry
Sourcepub fn geometry_type(&self) -> &'static str
pub fn geometry_type(&self) -> &'static str
Return the OGC geometry-type name (uppercase).
Sourcepub fn point_count(&self) -> usize
pub fn point_count(&self) -> usize
Return the total number of coordinate points in this geometry.
Trait Implementations§
Source§impl Clone for GpkgGeometry
impl Clone for GpkgGeometry
Source§fn clone(&self) -> GpkgGeometry
fn clone(&self) -> GpkgGeometry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GpkgGeometry
impl Debug for GpkgGeometry
Source§impl PartialEq for GpkgGeometry
impl PartialEq for GpkgGeometry
impl StructuralPartialEq for GpkgGeometry
Auto Trait Implementations§
impl Freeze for GpkgGeometry
impl RefUnwindSafe for GpkgGeometry
impl Send for GpkgGeometry
impl Sync for GpkgGeometry
impl Unpin for GpkgGeometry
impl UnsafeUnpin for GpkgGeometry
impl UnwindSafe for GpkgGeometry
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