pub enum GpkgGeometry {
Show 29 variants
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>),
PointZ {
x: f64,
y: f64,
z: f64,
},
LineStringZ {
coords: Vec<(f64, f64, f64)>,
},
PolygonZ {
rings: Vec<Vec<(f64, f64, f64)>>,
},
MultiPointZ {
points: Vec<(f64, f64, f64)>,
},
MultiLineStringZ {
lines: Vec<Vec<(f64, f64, f64)>>,
},
MultiPolygonZ {
polygons: Vec<Vec<Vec<(f64, f64, f64)>>>,
},
GeometryCollectionZ(Vec<GpkgGeometry>),
PointM {
x: f64,
y: f64,
m: f64,
},
LineStringM {
coords: Vec<(f64, f64, f64)>,
},
PolygonM {
rings: Vec<Vec<(f64, f64, f64)>>,
},
MultiPointM {
points: Vec<(f64, f64, f64)>,
},
MultiLineStringM {
lines: Vec<Vec<(f64, f64, f64)>>,
},
MultiPolygonM {
polygons: Vec<Vec<Vec<(f64, f64, f64)>>>,
},
GeometryCollectionM(Vec<GpkgGeometry>),
PointZM(Point4D),
LineStringZM {
coords: Vec<Point4D>,
},
PolygonZM {
rings: Vec<Vec<Point4D>>,
},
MultiPointZM {
points: Vec<Point4D>,
},
MultiLineStringZM {
lines: Vec<Vec<Point4D>>,
},
MultiPolygonZM {
polygons: Vec<Vec<Vec<Point4D>>>,
},
GeometryCollectionZM(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. Z variants carry an additional elevation / height coordinate per vertex.
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.
PointZ
A single 3D point with Z coordinate.
Fields
LineStringZ
An ordered sequence of 3D points forming a line.
PolygonZ
A 3D polygon defined by one exterior ring and zero or more interior rings.
MultiPointZ
A collection of 3D points.
MultiLineStringZ
A collection of 3D line strings.
MultiPolygonZ
A collection of 3D polygons.
Fields
GeometryCollectionZ(Vec<GpkgGeometry>)
A heterogeneous collection of geometries (may include Z variants).
PointM
A single XYM point (x, y, m — measure coordinate).
LineStringM
An ordered sequence of XYM points forming a line.
PolygonM
An XYM polygon (exterior ring + optional interior rings).
MultiPointM
A collection of XYM points.
MultiLineStringM
A collection of XYM line strings.
MultiPolygonM
A collection of XYM polygons.
Fields
GeometryCollectionM(Vec<GpkgGeometry>)
A heterogeneous collection of geometries that may include M variants.
PointZM(Point4D)
A single XYZM point (x, y, z, m).
LineStringZM
An ordered sequence of XYZM points forming a line.
PolygonZM
An XYZM polygon (exterior ring + optional interior rings).
MultiPointZM
A collection of XYZM points.
MultiLineStringZM
A collection of XYZM line strings.
MultiPolygonZM
A collection of XYZM polygons.
GeometryCollectionZM(Vec<GpkgGeometry>)
A heterogeneous collection of geometries that may include ZM variants.
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.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GpkgGeometry
impl Debug for GpkgGeometry
Source§impl PartialEq for GpkgGeometry
impl PartialEq for GpkgGeometry
Source§fn eq(&self, other: &GpkgGeometry) -> bool
fn eq(&self, other: &GpkgGeometry) -> bool
self and other values to be equal, and is used by ==.