ds.rst.from_pointcloud_regular() or Raster.from_pointcloud_regular()#
- classmethod RasterBase.from_pointcloud_regular(pointcloud, grid_coords=None, transform=None, shape=None, nodata=None, data_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 (
PointCloudBase|GeoDataFrame|DataArray) – Point cloud.grid_coords (
tuple[NDArray[floating[Any] |integer[Any]],NDArray[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_name (
str) – Name to use for point cloud data attribute, 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:
RasterType