Skip to content

Resolve "Numpy raster metadata"

King, Jonathan M requested to merge ghsc/users/jking/pfdf:26-rasters into main

Overview

Closes #26 (closed)

This MR provides a simpler framework for handling raster metadata. The main items of this request are the _rasters.Raster and rasters.NumpyRaster classes. _rasters.Raster is an internal class used to move raster values and metadata around the package. NumpyRaster is a user-facing class that allows users to tag numpy arrays with raster metadata.

In the short term, this removes the need for functions to support NoData arguments for numpy rasters, as these can be provided using a NumpyRaster object as input. For future updates, this provides a consolidated place to parse and check geotransform, affine, and crs metadata - as well as a centralized place to parse various raster objects (pysheds rasters, riox, etc.)

Updated overview

Closes #24 (closed), Closes #32 (closed)

I had some extra time, so now this MR includes some additional items. The main new feature is that the project now supports TauDEM on linux. This required various small adjustments to the dem module. Then added a conda environment to the pipeline, along with all the taudem tests (which were formerly disabled).

Two other miscellaneous updates: removed underscores from various type hints (to better follow PEP recommendations), and consolidated all the NoData utils into a separate module.

Edited by King, Jonathan M

Merge request reports