Skip to main content

Crate octaindex3d

Crate octaindex3d 

Source
Expand description

§OctaIndex3D v0.5.0

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::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;

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
hilbert
Hilbert64 - 3D Hilbert curve implementation for spatial indexing
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
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
performance
High-performance batch operations with SIMD, parallel, and GPU acceleration

Constants§

VERSION
Library version