Gridding points to raster

Gridding points to raster#

This example demonstrates the gridding of a point cloud into a raster using gridding().

We open an example point cloud, an elevation dataset in New Zealand.

import geoutils as gu

filename_pc = gu.examples.get_path("coromandel_lidar")
pc = gu.PointCloud(filename_pc, data_column="Z")

# Plot the point cloud
pc.plot(cmap="terrain", cbar_title="Elevation (m)")
gridding

We generate grid coordinates to interpolate to, alternatively we could pass a raster to use as reference.

We then perform the interpolation

Finally, we plot the resulting raster

rast.plot(ax="new", cmap="terrain", cbar_title="Elevation (m)")
gridding

Total running time of the script: (0 minutes 49.525 seconds)

Gallery generated by Sphinx-Gallery