Skip to main content

oxigdal_core/vector/
mod.rs

1//! Vector data types and utilities
2//!
3//! This module provides types for representing and working with vector geospatial data,
4//! including geometries, features, and feature collections.
5//!
6//! # Geometry Types
7//!
8//! Following the OGC Simple Features specification:
9//! - [`geometry::Point`] - 0-dimensional geometry
10//! - [`geometry::LineString`] - 1-dimensional geometry
11//! - [`geometry::Polygon`] - 2-dimensional geometry
12//! - [`geometry::MultiPoint`] - Collection of points
13//! - [`geometry::MultiLineString`] - Collection of line strings
14//! - [`geometry::MultiPolygon`] - Collection of polygons
15//! - [`geometry::GeometryCollection`] - Heterogeneous collection
16//!
17//! # Features
18//!
19//! A [`feature::Feature`] combines a geometry with properties (attributes).
20//! Features can be organized into [`feature::FeatureCollection`]s.
21//!
22//! # Example
23//!
24//! ```
25//! use oxigdal_core::vector::{
26//!     geometry::{Point, Coordinate, Geometry},
27//!     feature::{Feature, PropertyValue},
28//! };
29//!
30//! // Create a point geometry
31//! let point = Point::new(10.0, 20.0);
32//!
33//! // Create a feature with the geometry
34//! let mut feature = Feature::new(Geometry::Point(point));
35//!
36//! // Add properties
37//! feature.set_property("name", PropertyValue::String("My Point".to_string()));
38//! feature.set_property("value", PropertyValue::Integer(42));
39//! ```
40
41pub mod feature;
42pub mod geometry;
43
44// Re-export commonly used types
45pub use feature::{Feature, FeatureCollection, FeatureId, PropertyValue};
46pub use geometry::{
47    Coordinate, Geometry, GeometryCollection, LineString, MultiLineString, MultiPoint,
48    MultiPolygon, Point, Polygon,
49};