Skip to main content

Crate geonative_core

Crate geonative_core 

Source
Expand description

§geonative-core

Core data model for geonative — a lightweight, pure-Rust geospatial library built from scratch.

This crate defines the interoperable intermediate representation that every format driver (geonative-filegdb, geonative-shapefile, geonative-geojson, geonative-geoparquet, …) reads into or writes from. The model is Simple-Features-shaped so WKB encoding, GeoJSON, Shapefile, and GeoParquet writers all become near-trivial walks over the tree.

§What’s in here

  • Geometry — the geometry tree (Point/Multi*/Polygon/Collection)
  • Coord — a single coordinate, with optional z and m
  • Value / ValueType — attribute values and their type tags
  • Featurefid + optional geometry + indexed attribute vector
  • Schema / FieldDef / GeomField — layer schema description
  • Crs — coordinate reference system (EPSG / WKT / PROJJSON)
  • Error — common error type

§Cargo features

  • geo-types (off by default)From/Into conversions between this crate’s Geometry and [geo_types::Geometry], plus Coord. Z/M is silently dropped because geo-types is 2D.

Re-exports§

pub use crs::Crs;
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.
error
Common error type. Drivers define their own dialect-specific errors and convert into this at the public-API boundary.
feature
A Feature is one row: an optional feature ID, an optional geometry, and an indexed attribute vector that parallels crate::Schema::fields.
geometry
Simple-Features geometry tree with optional Z/M ordinates.
schema
Layer schema description. Format readers populate it; format writers consult it. Fields are an ordered vector with name lookup as a secondary index — DBF, GDB, and Arrow all require defined column order.
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.