Pygeoprocessing

Latest version: v2.4.6

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

Scan your dependencies

Page 4 of 11

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.

1.9.0

------------------
* Fixed a memory error issue that could occur on multiple flow direction flow
accumulation calculations.
* Added PEP518-compatible build dependencies to ``pyproject.toml``, which has
been added to source distributions of pygeoprocessing.
* Added an out-of-core high performance raster percentile function at
pygeoprocessing.raster_band_percentile.
* Added a ``pygeoprocessing.symbolic.evaluate_raster_calculator_expression``
function that can parse a string expression and a map of symbols to
calculate a raster calculation operation.
* Modified ``pygeoprocessing.routing.fill_pits`` to create a single band
raster of the input DEM raster/path band rather than a copy of the input
DEM raster irrespective of the band number.
* Fixed an issue that would cause the bounding box generated by
transform_bounding_box`` to flip the min and max coordinates in some
spatial contexts.
* Defaulting compression algorithm back to LZW as ZSTD is not a widely
implemented compression standard for geotiffs.

1.8.0

------------------
* Added a ``'numpy_type'`` field to the result of ``get_raster_info`` that
contains the equivalent numpy datatype of the GDAL type in the raster. This
includes functionality differentate between the unsigned and signed
``gdal.GDT_Byte`` vs. ``numpy.int8`` and ``numpy.uint8``.
* Changed default compression routine for GeoTIFFs to ZSTD (thanks Facebook
https://facebook.github.io/zstd/).
* Added a **non-backwards compatible change** by replacing the
``gtiff_creation_options`` string to a driver/option string named
``raster_driver_creation_tuple``. This allows the caller to create any type
of ``GDAL`` writable driver along with the option list associated with that
driver.
* Added a ``'numpy_type'`` field to the result of ``get_raster_info`` that
contains the equivalent numpy datatype of the GDAL type in the raster. This
includes functionality differentate between the unsigned and signed
``gdal.GDT_Byte`` vs. ``numpy.int8`` and ``numpy.uint8``.
* Changed default compression routine for GeoTIFFs to ZSTD (thanks Facebook
https://facebook.github.io/zstd/).
* Added a ``'file_list'`` key to the dictionary returned by
``get_raster_info`` and ``get_vector_info`` that contains a list of all the
files associated with that GIS object. The first parameter of these lists
can be passed to ``gdal.OpenEx`` to open the object directly.
* Added a ``get_gis_type`` function to ``pygeoprocessing`` that takes a
filepath and returns a bitmask of ``pygeoprocessing.RASTER_TYPE`` and/or
``pygeoprocessing.VECTOR_TYPE``.
* Modified ``iterblocks`` to raise a helpful ValueError instead of a general
NoneTypeError if a raster does not open.

1.7.0

------------------
* Removing support for Python 2.7.
* Adding D8 watershed delineation as
``pygeoprocessing.routing.delineate_watersheds_d8``.
* Corrected an issue with ``pygeoprocessing.create_raster_from_vector_extents``
where a vector with no width or no height (a vector with a single point, for
example) would result in invalid raster dimensions being passed to GDAL.
These edge cases are now guarded against.
* ``pygeoprocessing.calculate_disjoint_polygon_set`` will now raise
``RuntimeError`` if it is passed a vector with no features in it.
* ``pygeoprocessing.rasterize`` will now raise ``RuntimeError`` if the
underlying call to ``gdal.RasterizeLayer`` encounters an error.
* Correcting an issue with the docstring in
``pygeoprocessing.reclassify_raster`` to reflect the current parameters.
* Changed ``zonal_statistics`` to always return a ``dict`` instead of
sometimes a ``defaultdict``. This allows pickling of the result, if desired.
* Adding automated testing via bitbucket pipelines.
* Correcting an issue with ``pygeoprocessing.zonal_statistics`` that was
causing test failures on Python 3.6.
* Pygeoprocessing is now tested against Python 3.7.
* Fixed an issue in distance transform where a vertical striping artifact
would occur in the masked region of some large rasters when distances should
be 0.
* Fixed an issue in all functionality that used a cutline polygon with
invalid geometry which would cause a crash. This was caused by `gdal.Warp`
when using the cutline functionality. Instead this functionality was
replaced with manual rasterization. In turn this introduces two optional
parameters:

* ``rasterize`` and ``mask_raster`` have a ``where_clause`` parameter
which takes a string argument in SQL WHERE syntax to filter
rasterization based on attribute values.
* ``warp_raster`` takes a ``working_dir`` parameter to manage local
temporary mask rasters.

* Removing a temporary working directory that is created when executing
pygeoprocessing.convolve_2d.
* Changed optional parameters involving layer indexes to be either indexes
or string ids. In all cases changing ``layer_index`` to ``layer_id`` in
the functions: ``get_vector_info``, ``reproject_vector``, ``warp_raster``,
``rasterize``, ``calculate_disjoint_polygon_set``, and ``mask_raster``.

Page 4 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.