Expand description
Core primitives and operations for processing GML (Geography Markup Language) data.
egml-core implements a subset of ISO 19136 GML 3.2
focused on 3-D geometry. It provides the geometry model, bounding-box computations,
triangulation, and distance queries needed to work with GML-based datasets.
§Module overview
| Module | Contents |
|---|---|
model::base | Root GML types: AbstractGml, Id |
model::basic_types | Primitive GML scalar types: Code, Measure |
model::feature | Abstract GML feature class |
model::geometry | Full geometry hierarchy: primitives, aggregates, and complexes |
util::plane | Plane in R³ — point + unit normal |
util::triangulate | Earcut-based polygon triangulation |
§Geometry hierarchy
AbstractGeometry
└── AbstractGeometricPrimitive
├── Point
├── AbstractCurve → LineString
├── AbstractSurface → Surface, TriangulatedSurface, Polygon, Triangle
└── AbstractSolid → Solid
AbstractGeometricAggregate
├── MultiCurve
└── MultiSurface
CompositeSurface§Quick-start example
use egml_core::model::geometry::DirectPosition;
use egml_core::model::geometry::primitives::LinearRing;
use egml_core::model::geometry::Envelope;
let pts = vec![
DirectPosition::new(0.0, 0.0, 0.0).unwrap(),
DirectPosition::new(1.0, 0.0, 0.0).unwrap(),
DirectPosition::new(1.0, 1.0, 0.0).unwrap(),
DirectPosition::new(0.0, 1.0, 0.0).unwrap(),
];
let ring = LinearRing::new(pts).unwrap();
let envelope = Envelope::from_points(ring.points()).unwrap();
assert!(envelope.size_x() > 0.0);Modules§
- model
- GML data model.
- resolver
- Reference resolution for
gml:id/xlink:hreftargets. - util
- Internal geometry utilities.
Macros§
- impl_
abstract_ curve_ mut_ traits - impl_
abstract_ curve_ traits - impl_
abstract_ feature_ mut_ traits - impl_
abstract_ feature_ traits - impl_
abstract_ geometric_ aggregate_ mut_ traits - impl_
abstract_ geometric_ aggregate_ traits - impl_
abstract_ geometric_ primitive_ mut_ traits - impl_
abstract_ geometric_ primitive_ traits - impl_
abstract_ geometry_ mut_ traits - impl_
abstract_ geometry_ traits - impl_
abstract_ gml_ mut_ traits - impl_
abstract_ gml_ traits - impl_
abstract_ ring_ mut_ traits - impl_
abstract_ ring_ traits - impl_
abstract_ solid_ mut_ traits - impl_
abstract_ solid_ traits - impl_
abstract_ surface_ mut_ traits - impl_
abstract_ surface_ patch_ mut_ traits - impl_
abstract_ surface_ patch_ traits - impl_
abstract_ surface_ traits - impl_
from_ for_ abstract_ curve_ kind - impl_
from_ for_ abstract_ curve_ kind_ ref - Implements
From<&$type>forAbstractCurveKindRefand forwards to the parentAbstractGeometricPrimitiveKindRef. - impl_
from_ for_ abstract_ geometric_ aggregate_ kind - impl_
from_ for_ abstract_ geometric_ aggregate_ kind_ ref - Implements
From<&$type>forAbstractGeometricAggregateKindRefand forwards to the parentAbstractGeometryKindReflevel so the conversion is available all the way up the chain. - impl_
from_ for_ abstract_ geometric_ primitive_ kind - impl_
from_ for_ abstract_ geometric_ primitive_ kind_ ref - Implements
From<&$type>forAbstractGeometricPrimitiveKindRefand forwards to the parentAbstractGeometryKindRef. - impl_
from_ for_ abstract_ geometry_ kind - impl_
from_ for_ abstract_ geometry_ kind_ ref - Implements
From<&$type>forAbstractGeometryKindRef. This is the root of the geometry ref hierarchy, so — unlike the deeper levels — it does not forward to a parent macro. - impl_
from_ for_ abstract_ gml_ kind - impl_
from_ for_ abstract_ object_ kind - impl_
from_ for_ abstract_ ring_ kind - impl_
from_ for_ abstract_ ring_ kind_ ref - Implements
From<&$type>forAbstractRingKindRefand forwards to the parentAbstractCurveKindRef. - impl_
from_ for_ abstract_ solid_ kind - impl_
from_ for_ abstract_ solid_ kind_ ref - Implements
From<&$type>forAbstractSolidKindRefand forwards to the parentAbstractGeometricPrimitiveKindRef. - impl_
from_ for_ abstract_ surface_ kind - impl_
from_ for_ abstract_ surface_ kind_ ref - Implements
From<&$type>forAbstractSurfaceKindRefand forwards to the parentAbstractGeometricPrimitiveKindRef. - impl_
from_ for_ abstract_ surface_ patch_ kind - impl_
from_ for_ surface_ kind - impl_
from_ for_ surface_ kind_ ref - Implements
From<&$type>forSurfaceKindRefand forwards to the parentAbstractSurfaceKindRef. - impl_
has_ geometry_ type - impl_
measure_ type - Implements the common constructor, accessors, and
Measureconversions shared by all named measure types. - impl_
surface_ mut_ traits - impl_
surface_ traits - impl_
try_ from_ abstract_ curve_ kind_ ref_ for_ enum - Implements
TryFrom<AbstractCurveKindRef>for an intermediate$EnumRefand forwards the downcast up to the parent level. - impl_
try_ from_ abstract_ geometric_ primitive_ kind_ ref_ for_ enum - Implements
TryFrom<AbstractGeometricPrimitiveKindRef>for an intermediate$EnumRefand forwards the downcast up to the parent level. - impl_
try_ from_ abstract_ geometry_ kind_ ref_ for_ enum - Implements
TryFrom<AbstractGeometryKindRef>for an intermediate$EnumRef, downcasting to a nested ref enum (e.g.AbstractSurfaceKindRef). - impl_
try_ from_ abstract_ surface_ kind_ ref_ for_ enum - Implements
TryFrom<AbstractSurfaceKindRef>for an intermediate$EnumRefand forwards the downcast up to the parent level. - impl_
try_ from_ for_ abstract_ curve_ kind - impl_
try_ from_ for_ abstract_ curve_ kind_ ref - Implements
TryFrom<AbstractCurveKindRef>for&$typeand forwards the downcast up to the parent level. - impl_
try_ from_ for_ abstract_ geometric_ aggregate_ kind - impl_
try_ from_ for_ abstract_ geometric_ aggregate_ kind_ ref - Implements
TryFrom<AbstractGeometricAggregateKindRef>for&$typeand forwards the downcast up to the parent level. - impl_
try_ from_ for_ abstract_ geometric_ primitive_ kind - impl_
try_ from_ for_ abstract_ geometric_ primitive_ kind_ ref - Implements
TryFrom<AbstractGeometricPrimitiveKindRef>for&$typeand forwards the downcast up to the parent level. - impl_
try_ from_ for_ abstract_ geometry_ kind - impl_
try_ from_ for_ abstract_ geometry_ kind_ ref - Implements
TryFrom<AbstractGeometryKindRef>for&$type, downcasting to a concrete leaf geometry. - impl_
try_ from_ for_ abstract_ gml_ kind - impl_
try_ from_ for_ abstract_ object_ kind - impl_
try_ from_ for_ abstract_ ring_ kind - impl_
try_ from_ for_ abstract_ ring_ kind_ ref - Implements
TryFrom<AbstractRingKindRef>for&$typeand forwards the downcast up to the parent level. - impl_
try_ from_ for_ abstract_ solid_ kind - impl_
try_ from_ for_ abstract_ solid_ kind_ ref - Implements
TryFrom<AbstractSolidKindRef>for&$typeand forwards the downcast up to the parent level. - impl_
try_ from_ for_ abstract_ surface_ kind - impl_
try_ from_ for_ abstract_ surface_ kind_ ref - Implements
TryFrom<AbstractSurfaceKindRef>for&$typeand forwards the downcast up to the parent level. - impl_
try_ from_ for_ abstract_ surface_ patch_ kind - impl_
try_ from_ for_ surface_ kind - impl_
try_ from_ for_ surface_ kind_ ref - Implements
TryFrom<SurfaceKindRef>for&$typeand forwards the downcast up to the parent level.
Enums§
- Error
- Errors returned by
egml-coreoperations.