Closed caldwellst closed 1 year ago
don't have permission to push and make PR
To make a PR, fork this repository, push the changes to your fork, and then make a pull request.
For more details: https://docs.github.com/en/get-started/quickstart/contributing-to-projects
Example code
rio.reproject
generates errors when the input data array isint64
.Cause
rasterio.dtypes.dtype_rev
now returns keys 12 and 13 forint64
anduint64
respectively, and 14 forint8
(if GDAL is above a certain version). However, the above example generates a key error because_NODATA_DTYPE_MAP
needs to be updated to include these new types, and currently only has keys to 1 to 11. The version of the GDAL reference table originally used has been updated with defaults for these new types (although they are allNone
).Note that there is another difference between the newer reference table and what's in
_NODATA_DTYPE_MAP
. Thecint
andcfloat
default values are nowNone
.Proposal
Easiest proposal would be to simply update
_NODATA_DTYPE_MAP
to include 12, 13, and 14, and adjustcint
andcfloat
. It would now be (followedCONTRIBUTING.rst
, but don't have permission to push and make PR):However, I am unaware why this is necessary (although not an expert in these things). If the existing nodata value is
None
, why only put to default during reprojection? Maybe worth considering dropping this to prevent needing to manually align again in the future?