brycefrank / pyfor

Tools for analyzing aerial point clouds of forest data.
MIT License
93 stars 19 forks source link

IndexError when creating a VoxelGrid #9

Closed brycefrank closed 5 years ago

brycefrank commented 6 years ago
IndexError                                Traceback (most recent call last)
<ipython-input-10-d572ce203027> in <module>()
     10         chm = cld.chm(cell_size = 1.64, interp_method = "nearest", pit_filter = "median")
---> 11         voxel_raster = voxel_grid.voxel_raster("count", "z")
     12         convex_hull = cld.convex_hull

~/miniconda3/envs/pyfor_env/lib/python3.6/site-packages/pyfor/voxelizer.py in voxel_raster(self, func, dim)
     43         # Set the values of the grid
---> 44         voxel_grid[cells["bins_x"], cells["bins_y"], cells["bins_z"]] = cells[dim]
     45 

IndexError: index 49 is out of bounds for axis 1 with size 49