Pygeoutils

Latest version: v0.18.0

Safety actively analyzes 688126 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

0.11.5

-------------------

Bug Fixes
~~~~~~~~~
- Fix an issue with ``gtiff2xarray`` where the ``scales`` and ``offsets``
attributes of the output ``DataArray`` were floats rather than tuples (:issue_3dep:`30`).

Internal Changes
~~~~~~~~~~~~~~~~
- Add a new function, ``transform2tuple``, for converting ``Affine`` transforms to a tuple.
Previously, the ``Affine`` transform was converted to a tuple using ``to_gdal()`` method
of ``rasterio.Affine`` which was not compatible with ``rioxarray``.

0.11.4

-------------------

Internal Changes
~~~~~~~~~~~~~~~~
- Use ``ujson`` for JSON parsing instead of ``orjson`` since ``orjson`` only serializes to
``bytes`` which is not compatible with ``aiohttp``.
- Convert the transform attribute data type from ``Affine`` to ``tuple`` since saving a data
array to ``netcdf`` cannot handle the ``Affine`` type.

0.11.3

-------------------

- Fix an issue in ``geotiff2xarray`` related to saving a ``xarray`` object to NetCDF when its
transform attribute has ``Affine`` type rather than a tuple.

0.11.2

-------------------

The highlight of this release is performance improvement in ``gtiff2xarray`` for
handling large responses.

New Features
~~~~~~~~~~~~
- Automatic detection of the driver by default in ``gtiff2xarray`` as opposed to it being
``GTiff``.

Internal Changes
~~~~~~~~~~~~~~~~
- Make ``geo2polygon``, ``get_transform``, and ``get_nodata_crs`` public functions
since other packages use it.
- Make ``xarray_mask`` a public function and simplify ``gtiff2xarray``.
- Remove ``MatchCRS`` since it's already available in ``pygeoogc``.
- Validate input geometry in ``geo2polygon``.
- Refactor ``gtiff2xarray`` to check for the ``ds_dims`` outside the main loops to
improve the performance. Also, the function tries to detect the dimension names
automatically if ``ds_dims`` is not provided by the user, explicitly.
- Improve performance of ``json2geodf`` by using list comprehension and performing
checks outside the main loop.

Bug Fixes
~~~~~~~~~
- Add the missing arguments for masking the data in ``gtiff2xarray``.

0.11.1

-------------------

Bug Fixes
~~~~~~~~~
- In some edge cases the y-coordinates of a response might not be monotonically sorted so
``dask`` fails. This release sorts them to address this issue.

0.11.0

-------------------

New Features
~~~~~~~~~~~~
- Function ``gtiff2xarray`` returns a parallelized ``xarray.Dataset`` or ``xarray.DataAraay``
that can handle large responses much more efficiently. This is achieved using ``dask``.

Breaking Changes
~~~~~~~~~~~~~~~~
- Drop support for Python 3.6 since many of the dependencies such as ``xarray`` and ``pandas``
have done so.
- Refactor ``MatchCRS``. Now, it should be instantiated by providing the in and out CRSs like so:
``MatchCRS(in_crs, out_crs)``. Then its methods, namely, ``geometry``, ``bounds`` and ``coords``,
can be called. These methods now have only one input, geometry.
- Change input and output types of ``MatchCRS.coords`` from tuple of lists of coordinates
to list of ``(x, y)`` coordinates.
- Remove ``xarray_mask`` and ``gtiff2file`` since ``rioxarray`` is more general and suitable.

Internal Changes
~~~~~~~~~~~~~~~~
- Remove unnecessary type checks for private functions.
- Refactor ``json2geodf`` to improve robustness. Use ``get`` method of ``dict`` for checking
key availability.

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.