Expand description
§OctaIndex3D
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
- High-Level Facade:
BccGridfor working in physical units (points to cells, neighbors, k-rings, A* pathfinding) without lattice details - 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::{BccGrid, Index64, Result};
// High-level API: a grid with 0.5-unit cells
let grid = BccGrid::new(0.5)?;
let cell = grid.cell_at(1.2, 3.4, 5.6)?;
assert_eq!(grid.neighbors(cell).len(), 14);
let start = grid.cell_at(0.0, 0.0, 0.0)?;
let goal = grid.cell_at(3.0, 3.0, 3.0)?;
let path = grid.astar(start, goal)?;
assert_eq!(path.cells.last(), Some(&goal));
// Lower-level API: a Morton-encoded storage key
let index = Index64::new(0, 0, 5, 100, 200, 300)?;
assert_eq!(index.decode_coords(), (100, 200, 300));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::grid::BccGrid;pub use crate::grid::GridPath;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::layers::export_mesh_obj;pub use crate::layers::export_mesh_ply;pub use crate::layers::export_mesh_stl;pub use crate::layers::extract_mesh_from_tsdf;pub use crate::layers::ESDFLayer;pub use crate::layers::LayeredMap;pub use crate::layers::Measurement;pub use crate::layers::Mesh;pub use crate::layers::OccupancyLayer;pub use crate::layers::OccupancyState;pub use crate::layers::OccupancyStats;pub use crate::layers::TSDFLayer;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::performance::GpuBackend;pub use crate::performance::GpuBatchProcessor;pub use crate::hilbert::Hilbert64;pub use crate::container_v2::ContainerWriterV2;pub use crate::container_v2::HeaderV2;pub use crate::container_v2::StreamConfig;pub use crate::geojson::to_geojson_points;pub use crate::geojson::write_geojson_linestring;pub use crate::geojson::write_geojson_polygon;pub use crate::geojson::GeoJsonOptions;pub use crate::id::CellID;Deprecated
Modules§
- compression
- Compression layer for OctaIndex3D container format
- container
- Container format for compressed spatial data
- container_
v2 - Container v2 - Append-friendly container format
- error
- Error types for OctaIndex3D v0.3.0
- frame
- Frame registry for coordinate reference systems
- geojson
- GeoJSON adapter for exporting spatial IDs
- grid
- High-level facade for working with the BCC lattice in physical units.
- hilbert
- Hilbert64 - 3D Hilbert curve implementation for spatial indexing
- id
- Cell ID system with 128-bit format and Bech32m encoding (legacy v0.2 API)
- ids
- ID types for OctaIndex3D v0.3.0
- io
- I/O operations for various file formats (legacy v0.2 API)
- lattice
- BCC Lattice geometry and mathematics v0.3.0
- layer
- Data layer storage and aggregation (legacy v0.2 API)
- layers
- Multi-layer spatial data on BCC lattice
- morton
- Morton (Z-order) encoding and decoding for 3D coordinates
- neighbors
- Neighbor operations for spatial IDs
- path
- Pathfinding and routing algorithms (legacy v0.2 API)
- performance
- High-performance batch operations with SIMD, parallel, and GPU acceleration
Constants§
- VERSION
- Library version