geoutils.Raster.from_pointcloud_regular#
- classmethod Raster.from_pointcloud_regular(pointcloud, grid_coords=None, transform=None, shape=None, nodata=None, data_column_name='b1', area_or_point='Point')[source]#
Create a raster from a point cloud with coordinates on a regular grid.
To inform on what grid to create the raster, either pass a tuple of X/Y grid coordinates, or the expected transform and shape. All point cloud coordinates must fall exactly at one of the coordinates of this grid.
- Parameters:
pointcloud (
GeoDataFrame|PointCloud) – Point cloud.grid_coords (
tuple[ndarray[tuple[Any,...],dtype[Union[floating[Any],integer[Any]]]],ndarray[tuple[Any,...],dtype[Union[floating[Any],integer[Any]]]]]) – Regular coordinate vectors for the raster, from which the geotransform and shape are deduced.transform (
Affine) – Geotransform of the raster.data_column_name (
str) – Name to use for point cloud data column, defaults to “bX” where X is the data band number.area_or_point (
Literal['Area','Point']) – Whether to set the pixel interpretation of the raster to “Area” or “Point”.
- Return type:
TypeVar(RasterType, bound= Raster)