Skip to main content

Crate egml_core

Crate egml_core 

Source
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

ModuleContents
model::baseRoot GML types: AbstractGml, Id
model::basic_typesPrimitive GML scalar types: Code, Measure
model::featureAbstract GML feature class
model::geometryFull geometry hierarchy: primitives, aggregates, and complexes
util::planePlane in R³ — point + unit normal
util::triangulateEarcut-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:href targets.
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> for AbstractCurveKindRef and forwards to the parent AbstractGeometricPrimitiveKindRef.
impl_from_for_abstract_geometric_aggregate_kind
impl_from_for_abstract_geometric_aggregate_kind_ref
Implements From<&$type> for AbstractGeometricAggregateKindRef and forwards to the parent AbstractGeometryKindRef level 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> for AbstractGeometricPrimitiveKindRef and forwards to the parent AbstractGeometryKindRef.
impl_from_for_abstract_geometry_kind
impl_from_for_abstract_geometry_kind_ref
Implements From<&$type> for AbstractGeometryKindRef. 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> for AbstractRingKindRef and forwards to the parent AbstractCurveKindRef.
impl_from_for_abstract_solid_kind
impl_from_for_abstract_solid_kind_ref
Implements From<&$type> for AbstractSolidKindRef and forwards to the parent AbstractGeometricPrimitiveKindRef.
impl_from_for_abstract_surface_kind
impl_from_for_abstract_surface_kind_ref
Implements From<&$type> for AbstractSurfaceKindRef and forwards to the parent AbstractGeometricPrimitiveKindRef.
impl_from_for_abstract_surface_patch_kind
impl_from_for_surface_kind
impl_from_for_surface_kind_ref
Implements From<&$type> for SurfaceKindRef and forwards to the parent AbstractSurfaceKindRef.
impl_has_geometry_type
impl_measure_type
Implements the common constructor, accessors, and Measure conversions 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 $EnumRef and forwards the downcast up to the parent level.
impl_try_from_abstract_geometric_primitive_kind_ref_for_enum
Implements TryFrom<AbstractGeometricPrimitiveKindRef> for an intermediate $EnumRef and 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 $EnumRef and 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 &$type and 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 &$type and 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 &$type and 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 &$type and 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 &$type and 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 &$type and 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 &$type and forwards the downcast up to the parent level.

Enums§

Error
Errors returned by egml-core operations.