Releases: hyriver/py3dep
Releases · hyriver/py3dep
v0.16.3
v0.16.2
Release Notes
Bug Fixes
- In
add_elvation
function, fix a bug where the function fails to add elevation to axarray.Dataset
with x and y dims not beingx
andy
.
Internal Changes
- Refactor
fill_depressions
function by porting the code frompyflwdir
and improve its performance and also now, it directly supportxarray.DataArray
. Now,pyflwdir
is not an optional dependency anymore. You can installnumba
to improve the performance of the function.
Breaking Changes
- The AirMap service has been deprecated and removed from the package. The
elevation_bycoords
function now only supports the the National Map and the 3DEP services.
v0.16.1
Release Notes
Bug Fixes
- In the
check_3dep_availability
function when the web service is down the function raises aTypeError
instead of setting the value of the failed resolution toFailed
. This is fixed now. (66
{.interpreted-text role="issue_3dep"}).
Internal Changes
- Simplify the logic of adding elevation to a Dataset in the
add_elevation
function to avoid modifying CRS of the input Dataset.
v0.16.0
Release Notes
New Features
- Add a new function called
get_map_vrt
for getting DEM within a bounding box and saving it as aVRT
file. This function has low memory usage and is useful for cases where the DEM is needed for a large area. Moreover, even for usual use cases it can be much faster thanget_dem
since it loads the data lazily, at the cost of higher disk usage. - In the
get_map
function, check if the input geometry is within the bounds of the 3DEP's WMS service and if not, raise an exception. - In the
fill_depressions
function add a new argument calledoutlets
for specifying outlet detection method: At the edge of all cells (edge
) or only the minimum elevation edge cell (min
; default). - Significantly improve the performance of
check_3dep_availability
function by minimizng the number of requests to the service and sending all requests asynchronously. Also, the returneddict
now usesFailed
for those resolutions where the service fails to return a valid response. It will remove the failed responses from the cache, so next time the function is called, it will try to get only the failed resolutions. - Add four new options to
add_elevation
:mask
for passing a mask andresolution
for specifying the resolution of the source DEM, andx_dim
andy_dim
for passing the names of spatial dimensions in the input dataset. Themask
option is useful for cases where the inputxarray.DataArray
orxarray.Dataset
has a mask and the user wants to use that mask for the elevation data as well. Theresolution
option is useful for cases where the user wants to get the elevation data at a higher resolution that will be downsampled by bilinear interpolation to the resolution of the inputxarray.DataArray
orxarray.Dataset
. The default isresolution=None
which means the resolution of the inputxarray.DataArray
orxarray.Dataset
will be used. Thex_dim
andy_dim
options are useful for cases where the inputxarray.DataArray
orxarray.Dataset
has different names for spatial dimensions thanx
andy
. The default isx_dim="x"
andy_dim="y"
.
Breaking Changes
- In the
elevation_profile
function remove theres
argument and use 10-m resolution DEM from 3DEP. Also, add two new attributes to the outputxarray.Dataset
:source
for the dataset to state the data source used andunits
for thedistance
variable to state the units of the distance, which is meters.
Internal Changes
- Improve initial load time by moving
import pyflwdir
to thefill_depressions
function.
Bug Fixes
- Decrease the number of pixels per request from 10e6 to 8e6 to reduce the request load (
65
{.interpreted-text role="issue_3dep"}).
v0.15.2
Release Notes
Internal Changes
- Remove dependency on
dask
.
v0.15.1
Release Notes
Bug Fixes
- Fix HyRiver libraries requirements by specifying a range instead of exact version so
conda-forge
can resolve the dependencies.
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
- In
static_3dep_dem
userioxarray
directly instead ofrasterio
since it can handle VRT files. - Improve performance and accuracy of
add_elevation
by using the dynamic 3DEP service and setting the resolution based on the inputxarray.DataArray
orxarray.Dataset
. - Improve the performance of
elevation_profile
by using the static 3DEP service when the input resolution is 10 m (which is the default for this function). - For now, retain compatibility with
shapely<2
while supportingshapley>=2
.
Bug Fixes
- In
add_elevation
, ensure that the resolution is in meters by reprojecting the input dataset to 5070 before extracting resolution and bound attributes.
v0.14.0
Release Notes
New Features
- Add a new function called
add_elevation
for adding elevation data as a new variable to an inputxarray.DataArray
orxarray.Dataset
. - The
elevation_bycoords
function now accepts a single coordinate and returns a float in addition to a list of coordinates that returned a list of elevations. - Modify the
elevation_bycoords
function to use the new elevation point query service (EPQS) web service. This only affects thesource="tnm"
option.
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.
v0.13.12
Release Notes
New Features
- Use pyflwdir package for depression filling operation instead of
richdem
since it appears to be unmaintained. Note thatpyflwdir
is an optional dependency. Also,pyflwdir
depends onnumba
which is not available for Python 3.11 yet. You can follow the progress ofnumba
's support for Python 3.11 here. - Add a new function called
get_dem
for obtaining DEM that is a wrapper ofstatic_3dep_dem
andget_map
functions. Sincestatic_3dep_dem
is faster, if the requested resolution is 10 m, 30 m, or 60 m,static_3dep_dem
will be used. Otherwise,get_map
will be used.
Internal Changes
- Significantly improve the performance of
elevation_bycoords
whentep
is used as the source by using the static DEM data instead of the dynamic DEM. - Fully migrate
setup.cfg
andsetup.py
topyproject.toml
. - Convert relative imports to absolute with
absolufy-imports
. - Sync all patch versions of HyRiver packages to x.x.12.
v0.13.11
Release Notes
New Features
- Use pyflwdir package for depression filling operation instead of
richdem
since it appears to be unmaintained. Note thatpyflwdir
is an optional dependency. Also,pyflwdir
depends onnumba
which is not available for Python 3.11 yet. You can follow the progress ofnumba
's support for Python 3.11 here. - Add a new function called
get_dem
for obtaining DEM that is a wrapper ofstatic_3dep_dem
andget_map
functions. Sincestatic_3dep_dem
is faster, if the requested resolution is 10 m, 30 m, or 60 m,static_3dep_dem
will be used. Otherwise,get_map
will be used.
Internal Changes
- Significantly improve the performance of
elevation_bycoords
whentep
is used as the source by using the static DEM data instead of the dynamic DEM. - Fully migrate
setup.cfg
andsetup.py
topyproject.toml
. - Convert relative imports to absolute with
absolufy-imports
.