brycefrank / pyfor

Tools for analyzing aerial point clouds of forest data.
MIT License
93 stars 19 forks source link

Raster Class #5

Closed brycefrank closed 6 years ago

brycefrank commented 6 years ago

Create a raster class that will serve as a wrapper for the hairier raster I/O functions of GDAL without having to use rasterio as a dependency. This class will represent a given manifestation of a grid object for some function (i.e. the min Z value in each cell) and will be the last step before output. This also will provide methods for importing raster data.

i.e.:

las1 = pyfor.cloud.Cloud("my.las")
las1.grid(1).metrics("max", "z").write_raster("mytif.tif") #.metrics in this case returns a Raster

or in the case of input

rast1 = pyfor.raster.Raster("my.tif")
rast1.plot() # plot a 2d raster in matplotlib
rast1.array # extract a numpy array of the raster