Releases: hyriver/pygeoutils
Releases · hyriver/pygeoutils
v0.19.0
Release Notes
New Features
- Add a function called
sample_window
to remsample a raster dataset using a window size and arasterio
supported resampling method. This is an efficient way of sampling large raster datasets without reading the entire dataset into memory. The function returns a generator that yields the sampled values in the order of the input coordinates. This function is based on therasterio.sample.sample_gen
function. - Add a function called
geo_transform
for transforming any Shapely geometry to a new CRS. It could be a single geometry or an array of geometries.
v0.18.0
Release Notes
New Features
- Add a function called
achored_amoothin
to smooth aLineString
using Cubnic splines that anchores the first and last points of theLineString
. - Add a function called
smooth_multilinestring
to smooth aMultiLineString
using the newanchored_smoothin
function. - In
line_curvature
usespline_curvature
to calculate the curvature of aLineString
at all points along theLineString
. This is more accurate than the previous method and users can now specify the smoothing factor (s
) and degree of the spline (k
) to control the smoothness of the spline that is used to calculate the curvature.
Breaking Changes
- Drop support for Python 3.8 since its end-of-life date is October 2024.
- Remove all exceptions from the main module and raise them from the
exceptions
module. This is to declutter the main module and make it easier to maintain.
Internal Changes
- Move all spline and smoothing functions to a new module called
smoothing
.
v0.17.1
Release Notes
Internal Changes
- Drop support for Python 3.8 since its end-of-life date is October 2024.
v0.17.0
Release Notes
Internal Changes
- Add the
exceptions
module to the high-level API to declutter the main module. In the future, all exceptions will be raised from this module and not from the main module. For now, the exceptions are raised from both modules for backward compatibility. - Switch to using the
src
layout instead of theflat
layout for the package structure. This is to make the package more maintainable and to avoid any potential conflicts with other packages. - Improve robustness of
json2geodf
by ensuring that all geojsons are in the same CRS.
v0.16.3
Release Notes
Internal Changes
- Add the
exceptions
module to the high-level API to declutter the main module. In the future, all exceptions will be raised from this module and not from the main module. For now, the exceptions are raised from both modules for backward compatibility. - Improve robustness of
json2geodf
by ensuring that all geojsons are in the same CRS.
v0.16.1
Release Notes
Bug Fixes
pyproj
uses its own env variables for SSL certification. This release fixes the issue withpyproj
not being able to download the grid database when using DOI SSL certification file. This release usespyproj.network.set_ca_bundle_path
for setting the SSL certification file given by the user viaHYRIVER_SSL_CERT
env variable.- Ignore
FutureWarning
of pandas 2.1.0 for all-NaN columns injson2geodf
.
Internal Changes
- For
Attrs
class, usedataclass
instead for better performance and consistency.
v0.16.0
Release Notes
Breaking Changes
- Refactor the spline generation functions to make them more efficient, more accurate, and more robust. Switched to using
UnivariateSpline
fromscipy
instead ofBSpline
. This allows for more control over smoothness of the spline via thesmooth
parameter. References to BSpline has been removed from the functions and a new functionality has been added. The new spline generation functions areGeoSpline
,make_spline
,spline_linestring
,smooth_linestring
,spline_curvature
, andline_curvature
. Thesmooth_linestring
function now returns aLineString
instead of aSpline
object. This function is intended for smoothing aLineString
when curvature, radius of curvature, and tangent angles are not needed. Thespline_linestring
function now returns aSpline
object that contains the smoothedLineString
and curvature, radius of curvature, and tangent angles. Also,line_curvature
function can be used to compute curvature, radius of curvature, and tangent angles of aLineString
at all point along theLineString
.
New Features
- Add a new function called
gtiff2vrt
for creating a VRT file from a list of GeoTiff files. Note that this new function requiresgdal
to be installed. - The
xd_write_crs
function now keepsspatial_ref
attribute of the inputxarray.DataArray
orxarray.Dataset
to retain CF compliance.
v0.15.2
Release Notes
New Features
- Add
geometry_reproject
function for reprojecting a geometry (bounding box, list of coordinates, or anyshapely.geometry
) to a new CRS. - Add
smooth_linestring
function for smoothing aLineString
using B-splines. - Make
make_bspline
andbspline_curvature
functions public. Themake_bspline
function usesscipy
to generate aBSplines
object and thebspline_curvature
function calculates the tangent angles, curvature, and radius of curvature of a B-spline at any point along the B-spline. - Improve the accuracy and performance of B-spline generation functions.
Internal Changes
- Remove dependency on
dask
.
v0.15.0
Release Notes
From release 0.15 onward, all minor versions of HyRiver packages will be pinned. This ensures that previous minor versions of HyRiver packages cannot be installed with later minor releases. For example, if you have py3dep==0.14.x
installed, you cannot install pydaymet==0.15.x
. This is to ensure that the API is consistent across all minor versions.
New Features
- For now, retain compatibility with
shapely<2
while supportingshapley>=2
.
v0.14.0
Release Notes
New Features
- Ignore index when concatenating multiple responses in
json2geodf
to ensure indices are unique - Add a new function, called
coords_list
, for converting/validating input coordinates of any type to alist
oftuple
, i.e.,[(x1, y1), (x2, y2), ...]
. - Make
xd_write_crs
function public. - In
xarray_geomask
if the input geometry is very small return at least one pixel. - Add a new function, called
multi2poly
, for converting aMultiPolygon
to aPolygon
in aGeoDataFrame
. This function tries to convertMultiPolygon
toPolygon
by first checking ifMultiPolygon
can be directly converted using their exterior boundaries. If not, will try to remove those small sub-Polygon
that their area is less than 1% of the total area of theMultiPolygon
. If this fails, the originalMultiPolygon
will be returned.
Breaking Changes
- Bump the minimum required version of
shapely
to 2.0, and use its new API.
Internal Changes
- Sync all minor versions of HyRiver packages to 0.14.0.