Expand description
§geonative-core
The data model + WKB codec + object-safe Dataset/Layer traits that
every other geonative crate builds on. Zero-dep (apart from thiserror)
and the optional geo-types feature for ecosystem interop.
§What’s in it
Pick one of these as your starting point depending on what you’re doing:
| Module | What it gives you |
|---|---|
geometry | Coord, Geometry (Simple Features tree), LineString, Polygon, GeometryType |
value | Value (attribute payload) + ValueType (schema discriminant) |
schema | Schema + FieldDef + GeomField — table-of-contents for one layer |
feature | Feature — fid + geometry + attributes |
crs | Crs enum (Unknown / Epsg / Wkt / Projjson) + EPSG resolution |
wkb | OGC SF WKB encoder + decoder + alloc-free bbox walker |
dataset | Object-safe Dataset / Layer traits for format-polymorphic code |
error | Crate-wide Error + Result |
[geo_types_interop] (feature-gated) | Conversions to/from the geo-types crate |
[raster] (feature-gated) | Raster IR — RasterTile, Band, PixelType, GeoTransform, RasterProfile, RasterLayer trait |
§Why this crate exists
Every format crate (filegdb, shapefile, geoparquet, mvt) reads/writes
its bytes into the same Feature / Geometry / Schema types defined
here. That sharing is what makes the workspace a coherent library
instead of seven independent format codecs.
§Stability
See STABILITY.md at the repo root. The growable IR enums
(Geometry, GeometryType, Value, ValueType, Crs) are
#[non_exhaustive] — adding variants in a SemVer-minor release does
not count as a break.
§What’s in here
Geometry— the geometry tree (Point/Multi*/Polygon/Collection)Coord— a single coordinate, with optionalzandmValue/ValueType— attribute values and their type tagsFeature—fid+ optional geometry + indexed attribute vectorSchema/FieldDef/GeomField— layer schema descriptionCrs— coordinate reference system (EPSG / WKT / PROJJSON)Error— common error type
§Cargo features
geo-types(off by default) —From/Intoconversions between this crate’sGeometryand [geo_types::Geometry], plusCoord. Z/M is silently dropped becausegeo-typesis 2D.raster(off by default) — adds the [raster] module with the raster IR (RasterTile,Band,PixelType,GeoTransform,RasterProfile,RasterLayertrait). Required bygeonative-geotiffand any raster format / processing crate. Vector-only consumers don’t need this feature.
Re-exports§
pub use crs::Crs;pub use dataset::Dataset;pub use dataset::Layer;pub use dataset::SingleLayerDataset;pub use error::Error;pub use error::Result;pub use feature::Feature;pub use geometry::Coord;pub use geometry::Geometry;pub use geometry::GeometryType;pub use geometry::LineString;pub use geometry::Polygon;pub use schema::FieldDef;pub use schema::GeomField;pub use schema::Schema;pub use value::Value;pub use value::ValueType;pub use wkb::bbox_from_bytes;
Modules§
- crs
- Coordinate reference system. Carried through verbatim from the source so each writer can serialize it in its own preferred form.
- dataset
- Object-safe
Dataset+Layertraits — the polymorphic surface that every concrete reader (geonative-filegdb, geonative-shapefile, future GPKG / GeoJSON / FlatGeoBuf) implements. - error
- The crate-wide error type plus its
Resultalias. - feature
- The “feature” — one row in a spatial dataset.
- geometry
- Simple-Features geometry tree with optional Z/M ordinates.
- schema
- Layer schema — the table-of-contents for one layer’s attributes + geometry + CRS.
- value
- Attribute values and their type tags.
- wkb
- OGC Simple Features Well-Known Binary (WKB) encoder + decoder for
Geometry.
Constants§
- VERSION
- Crate version, for diagnostic use.