TopoFlow is a component-based, spatial hydrologic model along with a large collection of utilities for data preparation, visualization and so on. Distributed as a Python package and version 3.6 has been updated to run in Python 3.*.
The function ds.GetGeoTransform from GDAL does not always return the upper left corner of the raster. Instead, it return an affine transformation from a corner of the raster, with delta x and delta y (i.e., xres and yres), and in the case of GLDAS tiff files, ds.GetGeoTransform returns the lower left corner instead of upper left corner. Hence the function get_raster_bounds returns incorrect boundary.
The
get_raster_bounds
intopoflow36.utils.regrid
returns incorrect bounds for some GeoTIFF files. The problem is in these lines:The function
ds.GetGeoTransform
from GDAL does not always return the upper left corner of the raster. Instead, it return an affine transformation from a corner of the raster, with delta x and delta y (i.e., xres and yres), and in the case of GLDAS tiff files,ds.GetGeoTransform
returns the lower left corner instead of upper left corner. Hence the functionget_raster_bounds
returns incorrect boundary.