rioxarray 0.16.0__tar.gz → 0.17.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rioxarray-0.16.0/rioxarray.egg-info → rioxarray-0.17.0}/PKG-INFO +1 -1
- {rioxarray-0.16.0 → rioxarray-0.17.0}/pyproject.toml +1 -1
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/raster_array.py +11 -9
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/raster_writer.py +5 -1
- {rioxarray-0.16.0 → rioxarray-0.17.0/rioxarray.egg-info}/PKG-INFO +1 -1
- {rioxarray-0.16.0 → rioxarray-0.17.0}/AUTHORS.rst +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/CONTRIBUTING.rst +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/LICENSE +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/LICENSE_datacube +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/LICENSE_xarray +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/MANIFEST.in +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/README.rst +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/__init__.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/_io.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/_options.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/_show_versions.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/crs.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/exceptions.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/merge.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/py.typed +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/raster_dataset.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/rioxarray.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/xarray_plugin.py +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/SOURCES.txt +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/dependency_links.txt +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/entry_points.txt +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/requires.txt +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/top_level.txt +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/setup.cfg +0 -0
- {rioxarray-0.16.0 → rioxarray-0.17.0}/setup.py +0 -0
|
@@ -47,21 +47,23 @@ from rioxarray.rioxarray import (
|
|
|
47
47
|
# Based on: https://github.com/OSGeo/gdal/blob/
|
|
48
48
|
# dee861e7c91c2da7ef8ff849947713e4d9bd115c/
|
|
49
49
|
# swig/python/gdal-utils/osgeo_utils/gdal_calc.py#L61
|
|
50
|
+
# And: https://github.com/rasterio/rasterio/blob/
|
|
51
|
+
# 9e643c3f563a679aa5400d9b1a263df97b34f9e0/rasterio/dtypes.py#L99-L112
|
|
50
52
|
_NODATA_DTYPE_MAP = {
|
|
51
53
|
1: 255, # GDT_Byte
|
|
52
54
|
2: 65535, # GDT_UInt16
|
|
53
55
|
3: -32768, # GDT_Int16
|
|
54
|
-
4:
|
|
55
|
-
5: -
|
|
56
|
-
6:
|
|
57
|
-
7:
|
|
56
|
+
4: 4294967295, # GDT_UInt32
|
|
57
|
+
5: -2147483648, # GDT_Int32
|
|
58
|
+
6: numpy.nan, # GDT_Float32
|
|
59
|
+
7: numpy.nan, # GDT_Float64
|
|
58
60
|
8: None, # GDT_CInt16
|
|
59
61
|
9: None, # GDT_CInt32
|
|
60
|
-
10:
|
|
61
|
-
11:
|
|
62
|
-
12:
|
|
63
|
-
13:
|
|
64
|
-
14:
|
|
62
|
+
10: numpy.nan, # GDT_CFloat32
|
|
63
|
+
11: numpy.nan, # GDT_CFloat64
|
|
64
|
+
12: 18446744073709551615, # GDT_UInt64
|
|
65
|
+
13: -9223372036854775808, # GDT_Int64
|
|
66
|
+
14: -128, # GDT_Int8
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
|
|
@@ -123,7 +123,11 @@ def _ensure_nodata_dtype(original_nodata, new_dtype):
|
|
|
123
123
|
if numpy.issubdtype(new_dtype, numpy.complexfloating):
|
|
124
124
|
nodata = original_nodata
|
|
125
125
|
else:
|
|
126
|
-
original_nodata =
|
|
126
|
+
original_nodata = (
|
|
127
|
+
float(original_nodata)
|
|
128
|
+
if not numpy.issubdtype(type(original_nodata), numpy.integer)
|
|
129
|
+
else original_nodata
|
|
130
|
+
)
|
|
127
131
|
failure_message = (
|
|
128
132
|
f"Unable to convert nodata value ({original_nodata}) to "
|
|
129
133
|
f"new dtype ({new_dtype})."
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|