Crate octaindex3d

Crate octaindex3d 

Source
Expand description

§OctaIndex3D v0.4.2

A 3D Spatial Indexing and Routing System based on Body-Centered Cubic (BCC) lattice with truncated octahedral cells.

This library provides efficient spatial analysis, indexing, and pathfinding in three dimensions at multiple scales using a BCC lattice structure.

§Key Features

  • Three ID Types: Galactic128 (global), Index64 (Morton), Route64 (local routing)
  • 14-Neighbor Connectivity: More isotropic than cubic grids
  • Hierarchical Refinement: Multi-resolution support
  • Bech32m Encoding: Human-readable text encoding with checksums
  • Compression: LZ4 (default) and optional Zstd support
  • Frame Registry: Coordinate reference system management
  • Container Format: Compressed spatial data storage

§Example

use octaindex3d::{Galactic128, Index64, Route64, Result};

// Create a global ID
let galactic = Galactic128::new(0, 5, 1, 10, 0, 2, 4, 6)?;

// Create a Morton-encoded index
let index = Index64::new(0, 0, 5, 100, 200, 300)?;

// Create a local routing coordinate
let route = Route64::new(0, 100, 200, 300)?;

// Get neighbors
let neighbors = octaindex3d::neighbors::neighbors_route64(route);
assert_eq!(neighbors.len(), 14);

Re-exports§

pub use crate::error::Error;
pub use crate::error::Result;
pub use crate::frame::get_frame;
pub use crate::frame::list_frames;
pub use crate::frame::register_frame;
pub use crate::frame::FrameDescriptor;
pub use crate::ids::FrameId;
pub use crate::ids::Galactic128;
pub use crate::ids::Index64;
pub use crate::ids::Route64;
pub use crate::lattice::Lattice;
pub use crate::lattice::LatticeCoord;
pub use crate::lattice::Parity;
pub use crate::lattice::BCC_NEIGHBORS_14;
pub use crate::performance::Backend;
pub use crate::performance::BatchIndexBuilder;
pub use crate::performance::BatchNeighborCalculator;
pub use crate::performance::BatchResult;
pub use crate::performance::ParallelBatchIndexBuilder;
pub use crate::performance::ParallelBatchNeighborCalculator;
pub use crate::id::CellID;

Modules§

compression
Compression layer for OctaIndex3D container format
container
Container format for compressed spatial data
error
Error types for OctaIndex3D v0.3.0
frame
Frame registry for coordinate reference systems
id
Cell ID system with 128-bit format and Bech32m encoding
ids
ID types for OctaIndex3D v0.3.0
io
I/O operations for various file formats
lattice
BCC Lattice geometry and mathematics v0.3.0
layer
Data layer storage and aggregation
morton
Morton (Z-order) encoding and decoding for 3D coordinates
neighbors
Neighbor operations for spatial IDs
path
Pathfinding and routing algorithms
performance
High-performance batch operations with SIMD, parallel, and GPU acceleration

Constants§

VERSION
Library version