1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Rust bindings for the TG Geometry library.
//!
//! TG is a fast and lightweight geometry library for C that provides spatial
//! operations including point-in-polygon, intersection tests, and more.
//!
//! # Quick Start
//!
//! ```rust,ignore
//! use tg_geom::{Geom, GeomType, Point, init_mimalloc};
//!
//! // Initialize mimalloc allocator (requires `mimalloc` feature)
//! init_mimalloc();
//!
//! // Create a point geometry
//! let point = Geom::new_point(Point::new(1.0, 2.0)).unwrap();
//! assert_eq!(point.geom_type(), GeomType::Point);
//!
//! // Parse from WKT
//! let polygon = Geom::from_wkt("POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))").unwrap();
//!
//! // Spatial predicates
//! let test_point = Geom::new_point(Point::new(5.0, 5.0)).unwrap();
//! assert!(polygon.contains(&test_point));
//!
//! // Export to different formats
//! let geojson = polygon.to_geojson();
//! let wkb = polygon.to_wkb();
//! ```
//!
//! # Features
//!
//! - `mimalloc` - Use mimalloc as the memory allocator (recommended for
//! performance)
pub use init_mimalloc;
pub use ;
pub use ;
pub use GeomType;
pub use ;
pub use ;
pub use ;
pub use Point;
pub use ;
pub use Rect;
pub use ;
pub use Segment;