Expand description
A trait-based interface for geospatial vector data interchange in Rust.
This crate contains a set of traits based on the Simple Features standard for geospatial vector data. These traits are designed to make it easy to operate on and consume geometries throughout the Rust ecosystem without knowing library-specific APIs or memory layouts.
It is expected that accessing any individual coordinate or value from a geometry is constant-time. This means that when implementing these traits on a format like WKB that requires linear-time search to locate coordinates, the WKB wrapper should have already undergone an initial pass to find the relevant byte offsets where coordinate sequences start and end.
This interface will usually but not always be zero-copy. Coordinate access is expected to be constant-time but not necessarily free. For example, WKB is not aligned and may use a different endianness than the current machine, so individual values may need to be cloned on read.
Modules§
- to_geo
- Convert structs that implement geo-traits to [geo-types] objects.
Structs§
- Unimplemented
Coord - An empty struct that implements CoordTrait.
- Unimplemented
Geometry - An empty struct that implements GeometryTrait.
- Unimplemented
Geometry Collection - An empty struct that implements GeometryCollectionTrait.
- Unimplemented
Line - An empty struct that implements LineTrait.
- Unimplemented
Line String - An empty struct that implements LineStringTrait.
- Unimplemented
Multi Line String - An empty struct that implements MultiLineStringTrait.
- Unimplemented
Multi Point - An empty struct that implements MultiPointTrait.
- Unimplemented
Multi Polygon - An empty struct that implements MultiPolygonTrait.
- Unimplemented
Point - An empty struct that implements PointTrait.
- Unimplemented
Polygon - An empty struct that implements PolygonTrait.
- Unimplemented
Rect - An empty struct that implements RectTrait.
- Unimplemented
Triangle - An empty struct that implements TriangleTrait.
Enums§
- Dimensions
- The logical dimension of the geometry.
- Geometry
Type - An enumeration of all geometry types that can be contained inside a GeometryTrait. This is used for extracting concrete geometry types out of a GeometryTrait.
Traits§
- Coord
Trait - A trait for accessing data from a generic Coord.
- Geometry
Collection Trait - A trait for accessing data from a generic GeometryCollection.
- Geometry
Trait - A trait for accessing data from a generic Geometry.
- Line
String Trait - A trait for accessing data from a generic LineString.
- Line
Trait - A trait for accessing data from a generic Line.
- Multi
Line String Trait - A trait for accessing data from a generic MultiLineString.
- Multi
Point Trait - A trait for accessing data from a generic MultiPoint.
- Multi
Polygon Trait - A trait for accessing data from a generic MultiPolygon.
- Point
Trait - A trait for accessing data from a generic Point.
- Polygon
Trait - A trait for accessing data from a generic Polygon.
- Rect
Trait - A trait for accessing data from a generic Rect.
- Triangle
Trait - A trait for accessing data from a generic Triangle.