Pygeoprocessing

Latest version: v2.4.3

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

Scan your dependencies

Page 1 of 10

2.4.3

------------------
* Wheels for python 3.12 are now built during our github actions runs.
https://github.com/natcap/pygeoprocessing/issues/381
* ``get_gis_type`` can accept a path to a remote file, allowing the GDAL driver
to open it if the driver supports the protocol.
https://github.com/natcap/pygeoprocessing/issues/375
* If running on a SLURM system (identified by the presence of ``SLURM*``
environment variables), the GDAL cache max is checked against the amount of
memory available on the compute node. If GDAL may exceed the available slurm
memory, a warning is issued or logged.
https://github.com/natcap/pygeoprocessing/issues/361
* Fixed an issue in ``extract_strahler_streams_d8`` where a nodata pixel
could be mistakenly treated as a stream seed point, ultimately creating
a stream feature with no geometry.
https://github.com/natcap/pygeoprocessing/issues/361
* Improved ``align_and_resize_raster_stack`` so that rasterization of a vector
mask only happens once, regardless of the number of rasters in the stack.
In addition, the created mask raster's path may be defined by the caller so
that it persists across calls to ``align_and_resize_raster_stack``.
https://github.com/natcap/pygeoprocessing/issues/366
* Improved ``warp_raster`` to allow for a pre-defined mask raster to be
provided instead of a vector. If both are provided, the mask raster alone is
used. The new mask raster must have the same dimensions and geotransform as
the output warped raster. https://github.com/natcap/pygeoprocessing/issues/366
* Pygeoprocessing is now tested against python 3.12.
https://github.com/natcap/pygeoprocessing/issues/355

2.4.2

------------------
* Fixed an issue where MFD flow direction was producing many nodata holes given
a large-enough DEM. These nodata holes would then propagate to flow
accumulation and stream extraction, producing very disjointed stream
networks. https://github.com/natcap/pygeoprocessing/issues/350
* Improved progress logging in MFD flow direction, MFD flow accumulation, MFD
stream extraction to prevent integer overflows in percentages and improve
the readability of log messages. https://github.com/natcap/pygeoprocessing/issues/246
* Fixed an issue introduced in 2.4.1 where ``zonal_statistics`` results could
vary depending on the bounding boxes of the disjoint polygon sets calculated
from the input vector.
* Added a new function, ``pygeoprocessing.align_bbox``, which pads a bounding
box to align with the grid of a given geotransform.
* Added support for int64 and uint64 (GDAL 3.5+)
https://github.com/natcap/pygeoprocessing/issues/352
* Added support for signed bytes (GDAL 3.7+)
https://github.com/natcap/pygeoprocessing/issues/329
* Fixed a bug where ``calculate_slope`` did not work as expected when the DEM
raster's nodata value is NaN (https://github.com/natcap/pygeoprocessing/issues/352)

2.4.1

------------------
* The ``pygeoprocessing`` package metadata has been updated to use
``importlib.metadata`` (python >= 3.8) or ``importlib_metadata``
(python < 3.8) for retrieving the package version, in keeping with
recommendations from ``setuptools_scm``. The dependency
``importlib_metadata`` is now required for installs on python < 3.8.
* Fixed another memory leak in ``pygeoprocessing.raster_calculator``, where
shared memory objects under certain circumstances were not being unlinked at
the end of the function, resulting in excess memory usage and a warning
during the shutdown of the python process.
https://github.com/natcap/pygeoprocessing/issues/247
* Added a new function, ``pygeoprocessing.array_equals_nodata``, which returns
a boolean array indicating which elements have nodata. It handles integer,
float, and ``nan`` comparison, and the case where the nodata value is `None`.
* Standardized the approach used in ``warp_raster`` and
``create_raster_from_bounding_box`` for determining the dimensions of the
target raster given a target bounding box and pixel sizes.
https://github.com/natcap/pygeoprocessing/issues/321
* ``pygeoprocessing.routing.delineate_watersheds_d8`` now handles the case
where the input flow direction raster does not have a defined spatial
reference. https://github.com/natcap/pygeoprocessing/issues/254
* Updating internal documentation describing TauDEM flow directions, and adding
for how to convert from a flow direction raster from what TauDEM expects to
what pygeoprocessing expects.
https://github.com/natcap/pygeoprocessing/issues/255
* Users may now specify the overview level to use when calling ``warp_raster``.
By default, ``pygeoprocessing`` will use the base layer.
https://github.com/natcap/pygeoprocessing/issues/326
* Fixed a bug across ``pygeoprocessing`` where some valid resampling methods
would throw an exception because they were not recognized. This was only
happening when ``pygeoprocessing`` was installed alongside GDAL < 3.4.
* Fixing an issue with ``pygeoprocessing.multiprocessing.raster_calculator``
where the function would raise an Exception when the target raster path was
provided as a filename only, not within a directory, even though the parent
directory could be inferred. https://github.com/natcap/pygeoprocessing/issues/313
* Fixing a bug where the statistics worker in
``pygeoprocessing.raster_calculator`` may return a complex value. This is
only an issue when pygeoprocessing is compiled against Cython 3.0.0 and
later. https://github.com/natcap/pygeoprocessing/issues/342
* Added the new function ``pygeoprocessing.raster_map``, a higher-level version
of ``raster_calculator``. https://github.com/natcap/pygeoprocessing/issues/235

2.4.0

------------------
* A new submodule, ``pygeoprocessing.kernels`` has been added to facilitate the
creation of kernel rasters needed for calls to
``pygeoprocessing.convolve_2d``. Functions for creating common decay kernels
have been added, along with functions to facilitate the creation of
distance-based kernels using a user-defined function
(``pygeoprocessing.create_kernel``) and to facilitate the creation of kernels
using custom 2D numpy arrays, such as those commonly used in image processing
(``pygeoprocessing.kernel_from_numpy_array``).
https://github.com/natcap/pygeoprocessing/issues/268
* Logging across functions in ``pygeoprocessing.geoprocessing`` now correctly
reports the function that it's being called from rather than ``<lambda>``.
https://github.com/natcap/pygeoprocessing/issues/300
* The function ``pygeoprocessing.reproject_vector`` now accepts an optional
parameter ``layer_name`` to allow the target vector layer name to be defined
by the user. If the user does not provide a ``layer_name``, the layer name
will be copied from the source vector.
https://github.com/natcap/pygeoprocessing/issues/301
* Implement the proposed new function ``pygeoprocessing.raster_reduce``, a
wrapper around ``pygeoprocessing.iterblocks``
(https://github.com/natcap/pygeoprocessing/issues/285)
* Nodata value checking in ``pygeoprocessing.routing`` now correctly handles
comparison of ``nan`` values. This is explicitly tested in
``pygeoprocessing.routing.fill_pits``, but should also improve the
experience of other routing functions as well.
https://github.com/natcap/pygeoprocessing/issues/248
* Added a function to build overviews for a raster,
``pygeoprocessing.build_overviews``. Related to this,
``pygeoprocessing.get_raster_info()`` now includes an ``'overviews'`` key
listing the pixel dimensions of each overview layer in a raster.
https://github.com/natcap/pygeoprocessing/issues/280
* Added a D8 stream extraction function at
``pygeoprocessing.routing.extract_streams_d8`` which takes a D8 flow
accumulation raster and a flow accumulation threshold, setting all pixels
with accumulation above that threshold to 1 and all other valid pixels to 0.
https://github.com/natcap/pygeoprocessing/issues/272
* Adding a new function, ``pygeoprocessing.create_raster_from_bounding_box``,
that enables the creation of a new raster from a bounding box.
https://github.com/natcap/pygeoprocessing/issues/276
* Win32 wheels of PyGeoprocessing are no longer created through our GitHub
Actions workflows and will no longer be produced or distributed as part of
our release checklist. For details (and metrics!) see:
https://github.com/natcap/pygeoprocessing/issues/232

2.3.5

------------------
* ``pygeoprocessing.calculate_disjoint_polygon_set`` now offers an optional
parameter, ``geometries_may_touch`` for cases where geometries are known to
have intersecting boundaries but nonintersecting interiors.
https://github.com/natcap/pygeoprocessing/issues/269
* Pygeoprocessing is now tested against Python 3.11.
* Adding the target filename to progress logging in
``pygeoprocessing.raster_calculator``.
* ``pygeoprocessing.zonal_statistics`` will now optionally include a count of
the number of pixels per value encountered under each polygon. A warning
will be logged when invoked on floating-point rasters, as using this on
continuous rasters can result in excessive memory consumption. To use this
feature, set ``include_value_counts=True`` when calling ``zonal_statistics``.
* ``pygeoprocessing.get_gis_type`` will now raise a ``ValueError`` if the file
cannot be opened as ``gdal.OF_RASTER`` or ``gdal.OF_VECTOR``.
https://github.com/natcap/pygeoprocessing/issues/244
* Fixing an error message in ``convolve_2d`` when the signal or kernel is a
row based blocksize. https://github.com/natcap/pygeoprocessing/issues/228.

2.3.4

------------------
* Fixing an issue with imports at the ``pygeoprocessing`` module level that was
causing linters like PyLint and IDE command-completion programs like JEDI-vim
to not be able to identify the attributes of the ``pygeoprocessing`` module
namespace.
* Reducing the amount of memory used by
``pygeoprocessing.new_raster_from_base`` when filling an array with values to
only as much memory as is needed for the datatype.
* Fixing a memory leak in ``pygeoprocessing.raster_calculator`` where
shared memory objects were being inadvertently created when they should not
have been and then they were not subsequently destroyed.
* ``calculate_disjoint_polygon_set`` will now skip over empty geometries.
Previously, the presence of empty geometries would cause an error to be
raised.
* Fixed a ``DeprecationWarning`` in ``calculate_disjoint_polygon_set`` caused
by the use of a deprecated logging ``warn`` method.

Page 1 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.