SpatialGrids.jl
Spatial grid data structures for Julia
Install / Use
/learn @FugroRoames/SpatialGrids.jlREADME
SpatialGrids.jl
SpatialGrids provides 2D and 3D grid structures for working with point cloud data.
The current grids available are a 2D raster and a sparse voxel grid for working with 3D point cloud.
Raster Grid
To create a 2D raster grid:
using SpatialGrids
points = rand(3, 100000) * 20.0
raster = rasterize_points(points, 0.1)
Sparse Voxel Grid
To create a sparse voxel grid with voxel side length of 10 metres for arbitrary points:
using SpatialGrids
points = rand(3, 100000) * 20.0
grid = SparseVoxelGrid(points, 10.0)
The created grid is an iteratable object that returns a Voxel at each index.
Each voxel can be accessed directly with a for loop or all voxels can be collected into an array.
Likewise, the returned Voxel is an iterable object that returns the point indices.
# Iterate through each voxel in grid
for voxel in grid
# Get each point index in voxel
for idx in voxel
# Do stuff with points[:,idx]
end
# Or, you may want all point indices in a voxel
all_point_indices = collect(voxel)
end
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
