Skip to content

Releases: natcap/pygeoprocessing

2.4.10

14 Jan 17:25
7714edf

Choose a tag to compare

  • A new module, pygeoprocessing.extensions, exposes the C++ extensions FastFileIterator and LRUCache, as well as the new ManagedRaster class (which was previously implemented in Cython). #439
  • Added support for 3D, Measured, and 3D Measured Polygon and MultiPolygon geometries to zonal_statistics. #448

2.4.9

10 Jul 19:20
68bc8b0

Choose a tag to compare

  • Watershed delineation will now always create a layer of type MultiPolygon.
    All features contained in this layer will subsequently be MultiPolygons.
    #435
  • raster_calculator calc_raster_stats=True will count the number
    of non-nodata pixels in the target raster and write
    'STATISTICS_VALID_PERCENT' metadata along with other stats.
    #431

2.4.8

02 May 19:12
d54df8d

Choose a tag to compare

  • zonal_statistics raises an error if the vector is not a Polygon
    or MultiPolygon geometry.
    #322
  • Handling a case in raster_map where an exception would be raised when a
    float32 array was passed along with a float64 nodata value.
    #358
  • reproject_vector will skip copying field values from the base layer
    to the target if doing so would raise a RuntimeError,
    such as when a string value cannot be represented by UTF-8.
    #418
  • raster_band_percentile can now optionally log a warning if the raster
    has a geographic CRS.
    #299

2.4.7

23 Jan 21:04
b50fead

Choose a tag to compare

  • Dropped support for Python 3.8. Added support for Python 3.13 and GDAL 3.9.
    #415
  • Added validation to reclassify_raster to raise a TypeError with a
    descriptive message if value_map contains non-numeric keys.
  • In warp_raster, if either base_raster_path or target_raster_path
    are not strings, a ValueError is now raised with a more helpful error
    message. #421

2.4.6

15 Oct 19:09
7d24459

Choose a tag to compare

2.4.6 (2024-10-15)

  • Removing the numpy<2 constraint for requirements.txt that should have
    been included in the 2.4.5 release. #396
  • Handling GDAL-based RuntimeErrors raised during pygeoprocessing.reproject_vector.
    #409

2.4.5

08 Oct 21:09
0ea1bc6

Choose a tag to compare

2.4.5 (2024-10-08)

  • Updating for numpy 2.0 API changes. Pygeoprocessing is now compatible with
    numpy 2.0 and later. #396

2.4.4

21 May 23:19
d0420d1

Choose a tag to compare

  • Our github actions for building python distributions now use
    actions/setup-python@v5, which uses node 20.
    #384
  • warp_raster and build_overviews no longer raise a ValueError if
    called with an invalid resampling algorithm. We now fall back to the
    underlying GDAL functions' error messages.
    #387
  • Updated to Cython 3.
  • Dropped support for Python 3.7.

2.4.3

06 Mar 22:00
49780e2

Choose a tag to compare

2.4.3 (2024-03-06)

  • Wheels for python 3.12 are now built during our github actions runs. #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. #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. #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. #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. #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. #366
  • Pygeoprocessing is now tested against python 3.12. #355

2.4.2

24 Oct 20:06
d34286d

Choose a tag to compare

  • 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. #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. #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+)
    #352
  • Added support for signed bytes (GDAL 3.7+)
    #329
  • Fixed a bug where calculate_slope did not work as expected when the DEM
    raster's nodata value is NaN (#352)

2.4.1

05 Sep 22:18
81d27b8

Choose a tag to compare

  • 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.
    #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.
    #321
  • pygeoprocessing.routing.delineate_watersheds_d8 now handles the case
    where the input flow direction raster does not have a defined spatial
    reference. #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.
    #255
  • Users may now specify the overview level to use when calling warp_raster.
    By default, pygeoprocessing will use the base layer.
    #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. #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. #342