Pygeoprocessing

Latest version: v2.4.3

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

Scan your dependencies

Page 3 of 10

2.1.2

------------------
* ``pygeoprocessing.warp_raster`` now raises a ``ValueError`` when an invalid
resampling method is provided.
* Fixed bug in ``pygeoprocessing.warp_raster`` that would not properly handle
GDAL Byte type signing when masking warped raster with a vector.
* Fixed issue in ``convolve_2d`` that would cause excessive memory use
leading to out of memory errors.
* Fixed issue in ``convolve_2d`` that could lead to a file removal race
condition and raise a ``FileNotFoundException`` when ignoring nodata
regions.

2.1.1

------------------
* Fixed a critical bug introduced in 2.1.0 that generated invalid results in
`convolve_2d` for any raster larger than 256x256.
* Added an optional parameter, ``target_layer_name`` to
``pygeoprocessing.routing.delineate_watersheds_d8`` for cases where a
caller would like to define the output layer name.

2.1.0

------------------
* Modified ``pygeoprocessing.numpy_array_to_raster`` to take boolean arrays.
* Modified ``pygeoprocessing.convolve_2d`` to guard against nonsensical queries
to both ``ignore_nodata_and_edges=True`` but also ``mask_nodata=False``.
A query of this combination now raises a ``ValueError`` to guard against
programmer error.
* Added a custom exception class ``ReclassificationMissingValuesError`` to
``pygeoprocessing``. ``pygeoprocessing.reclassify_raster`` raises this
exception instead of ``ValueError`` when a raster pixel value is not
represented in ``value_map``. This custom exception provides a list of
missing raster pixel values in a ``missing_values`` attribute that allows
the caller access to the pixel values that are missing through a Python type
rather than indirectly through an error message.
* Correcting the docstring for ``pygeoprocessing.numpy_array_to_raster`` to
specify that the ``pixel_size`` parameter must be a tuple or list, not an
int.
* ``pygeoprocessing.routing.delineate_watersheds_d8`` now has an optional
parameter ``write_diagnostic_vector``. When ``True``, this parameter will
cause a new vector per outflow feature to be created in the ``working_dir``.
This parameter defaults to ``False``. This is a change from prior behavior,
when the diagnostic vectors were always created, which could occupy a lot of
computational time under large outflow geometries.
* Added a ``pygeoprocessing.multiprocessing.raster_calculator`` function which
matches the API and results of ``pygeoprocessing.raster_calculator`` but uses
multiple processing cores to compute raster calculation blocks.
when the diagnostic vectors were always created, which could occupy
significant computational time under large outflow geometries.
* Minor performance improvement to ``pygeoprocessing.convolve_2d`` by
preventing a pre-processing step that initialized temporary rasters with zero
values as well as added asynchronous work distribution for kernel/signal
block processing.
* Modified logging message for ``pygeoprocessing.new_raster_from_base`` when
filling a raster such that an informative error message is printed with
context as to the function, file, status, and value being filled.

2.0.0

------------------
* Adding Python 3.8 support and dropping Python 3.6 support.
* Adding GDAL 3 support and dropping GDAL 2 support. The only non-backwards
compatible issue in GDAL 2 to GDAL 3 is the need to handle Axis Ordering with
osr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) because of
https://trac.osgeo.org/gdal/wiki/rfc73_proj6_wkt2_srsbarn#Axisorderissues?.
Since Axis ordering now matters for Geographic CRS the expected order is
Lat,Lon but we use osr.OAMS_TRADITIONAL_GIS_ORDER to swap to Lon,Lat.
* Using osr.CreateCoordinateTransformation() instead of
osr.CoordinateTransformation() as the GDAL 3 call.
* Fixed a bug in convolve_2d that would not ``ignore_nodata`` if the signal
raster's nodata value was undefined. Changed the name of this flag to
``ignore_nodata_and_edges`` to reflect its expected functionality.
* Warped signed byte rasters are now also signed byte rasters.
* Adding a GitHub Actions-based build job for building wheels and a source
distribution for a given commit of pygeoprocessing.
* Updated ``setup.py`` to point the URL project link to the project's new
home on GitHub.
* Updated ``MANIFEST.in`` to only include files that should be there in the
pygeoprocessing source distribution. This fixes an issue where files
matching a variety of extensions anywhere in the pygeoprocessing directory
might be included with the source distribution.
* Added ``set_tol_to_zero`` to ``convolve_2d`` to allow for in-function masking
of near-zero results to be set to 0.0.
* Fixed malformed logging outputs which could be seen during long running
``rasterize`` calls.
* Renamed all parameters involving Spatial Projections to the form
``[var_id]_projection_wkt``, this involves optional arguments in
``reproject_vector``, ``warp_raster``, ``transform_bounding_box``,
and ``align_and_resize_raster_stack`` as well as the return value from
``get_raster_info`` and ``get_vector_info``.
* Fixed an issue in ``zonal_statistics`` that would crash if an aggregate
vector had a feature with no geometry defined. Now the function ignores
such features and prints a warning to the log.
* Fixed a malformed ``ValueError`` message when a corrupt raster was
encountered in ``raster_calculator``.
* Fixes an unnecessary calculation that pre-fills slope raster GeoTIFFs with
nodata values.
* Added a check to ``convolve_2d`` to verify that raster path/band tuples were
passed where expected and raise a useful Exception if not.
* Removed most of the `pygeoprocessing.testing` module and added the following
convenience functions to ``pygeoprocessing``, which should not be used
for production code but are useful for testing and scripting:

* ``raster_to_numpy_array`` - read a single band of a raster into a ``numpy``
array, runs the risk of memory error if the raster is too large.
* ``numpy_array_to_raster`` - writes a ``numpy`` array to a raster on disk.
* ``shapely_geometry_to_vector`` - creates a vector from a list of
``Shapely`` geometry.

* Fixed an issue in ``flow_dir_mfd`` that would cause invalid flow directions
on DEMs that had very small numerical delta heights.
* Fixes an issue in ``convolve_2d`` that would occasionally cause undefined
numerical noise in regions where the signal was nodata but ``mask_nodata``
was set to ``False``.

1.9.2

------------------
* Removed the ``multiprocessing`` dependency to avoid an occasional deadlock
that occurred on Mac OS X during ``align_and_resize_raster_stack``.
That function now operates serially, but multithreading can be used by
passing ``gdal_warp_options``.

1.9.1

------------------
* Fixed a compilation issue on Mac OS X Catalina related to the compilation
of a template in the file iteration component of the out-of-core percentile
function.
* Resolved a compilation issue on Mac OS X (Mavericks and later) where
pygeoprocessing would not compile unless some additional compiler and linker
flags were provided. These are now accounted for in the package's compilation
steps in ``setup.py``.
* ``pygeoprocessing.symbolic.evaluate_raster_calculator_expression``
no longer depends on ``sympy`` for its expression evaluation.

Page 3 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.