geoutils.PointCloud.grid#
- PointCloud.grid(ref=None, grid_coords=None, res=None, resampling='linear', dist_nodata_pixel=1.0, nodata=-9999)[source]#
Grid point cloud into a raster.
Output grid can be defined either by passing a reference raster to match, or by passing output grid coordinates for X/Y (must be regular in each dimension), or by specifying an output grid resolution (which uses the upper-left bounds of point cloud to define the start of the grid).
- Parameters:
ref (
Raster|None) – Reference raster to match (if output grid coordinates or output resolution undefined).grid_coords (
tuple[ndarray[tuple[Any,...],dtype[Union[floating[Any],integer[Any]]]],ndarray[tuple[Any,...],dtype[Union[floating[Any],integer[Any]]]]] |None) – Output grid coordinates in X and Y (if reference raster or output resolution undefined).res (
float|tuple[float,float] |None) – Output resolution (if reference raster or output grid coordinates undefined).resampling (
Literal['nearest','linear','cubic']) – Resampling method within delauney triangles (defaults to linear).dist_nodata_pixel (
float) – Distance from the point cloud after which grid cells are filled by nodata values, expressed in number of pixels.nodata (
int|float) – Nodata value of output raster (defaults to -9999).
- Return type:
- Returns:
Raster from gridded point cloud.