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.
Files changed (30) hide show
  1. {rioxarray-0.16.0/rioxarray.egg-info → rioxarray-0.17.0}/PKG-INFO +1 -1
  2. {rioxarray-0.16.0 → rioxarray-0.17.0}/pyproject.toml +1 -1
  3. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/raster_array.py +11 -9
  4. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/raster_writer.py +5 -1
  5. {rioxarray-0.16.0 → rioxarray-0.17.0/rioxarray.egg-info}/PKG-INFO +1 -1
  6. {rioxarray-0.16.0 → rioxarray-0.17.0}/AUTHORS.rst +0 -0
  7. {rioxarray-0.16.0 → rioxarray-0.17.0}/CONTRIBUTING.rst +0 -0
  8. {rioxarray-0.16.0 → rioxarray-0.17.0}/LICENSE +0 -0
  9. {rioxarray-0.16.0 → rioxarray-0.17.0}/LICENSE_datacube +0 -0
  10. {rioxarray-0.16.0 → rioxarray-0.17.0}/LICENSE_xarray +0 -0
  11. {rioxarray-0.16.0 → rioxarray-0.17.0}/MANIFEST.in +0 -0
  12. {rioxarray-0.16.0 → rioxarray-0.17.0}/README.rst +0 -0
  13. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/__init__.py +0 -0
  14. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/_io.py +0 -0
  15. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/_options.py +0 -0
  16. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/_show_versions.py +0 -0
  17. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/crs.py +0 -0
  18. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/exceptions.py +0 -0
  19. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/merge.py +0 -0
  20. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/py.typed +0 -0
  21. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/raster_dataset.py +0 -0
  22. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/rioxarray.py +0 -0
  23. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray/xarray_plugin.py +0 -0
  24. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/SOURCES.txt +0 -0
  25. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/dependency_links.txt +0 -0
  26. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/entry_points.txt +0 -0
  27. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/requires.txt +0 -0
  28. {rioxarray-0.16.0 → rioxarray-0.17.0}/rioxarray.egg-info/top_level.txt +0 -0
  29. {rioxarray-0.16.0 → rioxarray-0.17.0}/setup.cfg +0 -0
  30. {rioxarray-0.16.0 → rioxarray-0.17.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rioxarray
3
- Version: 0.16.0
3
+ Version: 0.17.0
4
4
  Summary: geospatial xarray extension powered by rasterio
5
5
  Maintainer: rioxarray Contributors
6
6
  License: Apache
@@ -4,7 +4,7 @@ requires = ["setuptools", "wheel"]
4
4
 
5
5
  [project]
6
6
  name = "rioxarray"
7
- version = "0.16.0"
7
+ version = "0.17.0"
8
8
  description = "geospatial xarray extension powered by rasterio"
9
9
  maintainers = [
10
10
  {name = "rioxarray Contributors"},
@@ -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: 4294967293, # GDT_UInt32
55
- 5: -2147483647, # GDT_Int32
56
- 6: 3.402823466e38, # GDT_Float32
57
- 7: 1.7976931348623158e308, # GDT_Float64
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: 3.402823466e38, # GDT_CFloat32
61
- 11: 1.7976931348623158e308, # GDT_CFloat64
62
- 12: None, # GDT_Int64
63
- 13: None, # GDT_UInt64
64
- 14: None, # GDT_Int8
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 = float(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})."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rioxarray
3
- Version: 0.16.0
3
+ Version: 0.17.0
4
4
  Summary: geospatial xarray extension powered by rasterio
5
5
  Maintainer: rioxarray Contributors
6
6
  License: Apache
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