Pygeoprocessing

Latest version: v2.4.3

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

Scan your dependencies

Page 4 of 10

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``.

1.6.1

------------------
* Added error checking in ``raster_calculator`` to help ensure that the
``target_datatype`` value is a valid GDAL type.
* Fixed an issue in ``distance_transform_edt`` that would occasionally
cause incorrect distance calculations when the x sampling distance was > 1.

1.6.0

------------------
* Changed ``iterblocks`` API to take a raster/path band as an input rather
than a path and a list of bands. Also removed the ``astype_list`` due to
its lack of orthogonality.
* Fixed bugs in ``convolve_2d`` involving inputs with nodata masking.
* Changing default raster creation compression algorithm from LZW to DEFLATE,
this is to address issues where we were seeing recreatable, but
unexplainable LZWDecode errors in large raster data.
* Fixed an issue that could cause the distance transform to be incorrect when
the sampling distance was in the noninclusive range of (0.0, 1.0).

1.5.0

------------------
* Specific type checking for ``astype_list`` in ``iterblocks`` to avoid
confusing exceptions.
* Renamed test suite to be consistent with the pattern
``test_[component].tif``.
* Added a function ``pygeoprocessing.routing.extract_streams_mfd`` that
creates a contiguous stream layer raster to accounts for the divergent flow
that can occur with multiple flow direction. If the flow direction raster is
otherwise directly thresholded, small disjoint streams can appear where
the downstream flow drops below the threshold level.
* Fixed an issue that could cause some custom arguments to geotiff creation
options to be ignored.
* Added a ``mask_raster`` function that can be used to mask out pixels in
an existing raster that don't overlap with a given vector.
* Fixed a bug in the ``distance_transform_edt`` function that would cause
incorrect distances to be calculated in the case of nodata pixels in the
region raster. The algorithm has been modified to treat nodata as though
pixel values were 0 (non-region) and the distance transform will be defined
for the entire raster.
* Added a ``sampling_distance`` parameter to ``distance_transform_edt`` that
linearly scales the distance transform by this value.
* Fixed an issue in ``calculate_slope`` that would raise an exception if the
input dem did not have a nodata value defined.
* Changed the behavior of ``zonal_statistics`` for polygons that that do not
intersect any pixels. These FIDs are now also included in the result from
``zonal_statistics`` where previously they were absent. This is to remain
consistent with how other GIS libraries calculate zonal stats.

Page 4 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.