las2img

treesegmentation.las2img.las2img(points_xyz, bounds_xyz, grid_size, cell_size, discretization)

Converts a collection of points into an aerial-view raster containing the highest points in each pixel.

Parameters
  • points_xyz – Collection of (x, y, z) points to consider.

  • bounds_xyz – Tuple of the min and max (x, y, z) coordinate.

  • grid_size – Tuple of the grid width and height (in number of pixels).

  • cell_size – Tuple of the width and height of each cell (in units of meters per pixel).

  • discretization – Number of “slices” or z-levels to encode in the image. Should be a power of 2.

Returns

A 2D array containing the highest z value of every point in each cell.