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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//! # Terrustrial
//!
//! **Terrustrial** is an experimental Rust library for geostatistics, variograms, and kriging, designed for high performance and flexibility in geospatial analysis.
//!
//! ## Features
//!
//! - **Geometry primitives**: Axis-aligned bounding boxes, ellipsoids, and support for spatial queries.
//! - **Spatial databases**: Efficient spatial indexing and coordinate system utilities.
//! - **Group operators**: Kriging, indicator kriging, and inverse distance estimation methods.
//! - **Variography**: Experimental and model variograms, including spherical, exponential, and composite models.
//! - **System solvers**: Linear algebra utilities for solving kriging systems.
//!
//! ## Example
//!
//! ```rust
//! use terrustrial::prelude::*;
//! // Read point cloud from file
//! let cond = SpatialAcceleratedDB::from_csv_index(FILE_PATH, "X", "Y", "Z", "CU")
//! .expect("Failed to create gdb");
//! // Create blocks and group provider
//! let blocks = get_blocks();
//! let groups = GroupProvider::optimized_groups(&blocks, 5.0, 5.0, 10.0, 2, 2, 2);
//! // Variogram setup
//! let vgram_rot = DRotor3::from_euler_angles(0.0, 0.0, 0.0);
//! let range = DVec3::new(100.0, 200.0, 100.0);
//! let sill = 1.0;
//! let spherical_vgram = CompositeVariogram::new(vec![VariogramType::Spherical(
//! SphericalVariogram::new(range, sill, vgram_rot),
//! )]);
//! // Search ellipsoid
//! let search_ellipsoid = Ellipsoid::new(
//! 200.0, 50.0, 50.0,
//! CoordinateSystem::new(DVec3::zero(), vgram_rot),
//! );
//! // Conditioning params
//! let params = ConditioningParams::default();
//! // Estimate grades using ordinary kriging
//! let values = estimate(
//! &cond,
//! ¶ms,
//! &spherical_vgram,
//! search_ellipsoid,
//! &groups,
//! SolvedLUOKSystemBuilder,
//! );
//! ```
//!
//! ## Modules
//!
//! - [`geometry`]: Geometric primitives and spatial support
//! - [`group_operators`]: Kriging and estimation algorithms
//! - [`spatial_database`]: Spatial data structures and indexing
//! - [`systems`]: Linear system solvers and modifiers
//! - [`variography`]: Variogram models and experimental tools
//!
//! ## License
//!
//! Licensed under MIT or Apache-2.0.
use DVec3;
pub const FORWARD: DVec3 = DVec3 ;
pub const RIGHT: DVec3 = DVec3 ;
pub const UP: DVec3 = DVec3 ;