SkillAgentSearch skills...

SpatialGrids.jl

Spatial grid data structures for Julia

Install / Use

/learn @FugroRoames/SpatialGrids.jl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

SpatialGrids.jl

Build Status Build status codecov

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

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated1mo ago
Forks4

Languages

Julia

Security Score

70/100

Audited on Feb 7, 2026

No findings