Releases: hyriver/py3dep
Releases · hyriver/py3dep
v0.13.3
Release Notes
Bug Fixes
- Fix a bug in
check_3dep_availabilitywhere due to changes inpygeoogcZeroMatchedexception is raised instead ofTypeErrorand as a resultcheck_3dep_availabilitywas not working as expected.
v0.13.2
Release Notes
Breaking Changes
- Set the minimum supported version of Python to 3.8 since many of the dependencies such as
xarray,pandas,rioxarrayhave dropped support for Python 3.7.
Internal Changes
- Use micromamba for running tests and use nox for linting in CI.
v0.13.1
Release Notes
New Features
- In
deg2mpmfunction look for_FillValueandnodatavalsin the attributes and if not found, fall back tonumpy.nan.
Internal Changes
- Ensure that the
deg2mpmfunction usesdaskif the input isdask-enabled. - In the
elevation_profilefunction use a bounding box to get DEM and a linear interpolation to get the elevation along the profile.
v0.13.0
Release Notes
New Features
- Add a new function called
query_3dep_sourcesfor querying bounds of 3DEP's data sources within a bounding box. It returns a geo-dataframe that contains the bounding box of each data source and a columndem_residentifying the resolution of the raw topographic data within each geometry. - Add a new function called
elevation_profilefor getting elevation profile along a line at a given spacing. This function converts the line to a B-spline and then calculates the elevation along the spline at a given uniform spacing.
Breaking Changes
-
Remove caching-related arguments from all functions since now they can be set globally via three environmental variables:
HYRIVER_CACHE_NAME: Path to the caching SQLite database.HYRIVER_CACHE_EXPIRE: Expiration time for cached requests in seconds.HYRIVER_CACHE_DISABLE: Disable reading/writing from/to the cache file.
You can do this like so:
import os
os.environ["HYRIVER_CACHE_NAME"] = "path/to/file.sqlite"
os.environ["HYRIVER_CACHE_EXPIRE"] = "3600"
os.environ["HYRIVER_CACHE_DISABLE"] = "true"v0.12.2
Release Notes
New Features
- Add a new DEM source to
elevation_bycoordsto get elevation from the National Map's 3DEP WMS service. This can replace thetnmsource sincetnmis not stable. - Add a new function called
check_3dep_availabilityto check the availability of 3DEP's native resolutions within an area of interest. It returns adictwith keys corresponding to the available resolutions and its values are boolean values indicating whether the resolution is available or not. - Replace no data values of
slopeindeg2mmwithnp.nan, so they do not get converted to another values. The output of this function hasnp.float64type.
Internal Changes
- Refactor
ElevationByCoordsby using__post_init__for validating the input parameters rather thanpydantic's validators. - Refactor
elevation_bygridby usingget_mapto get DEM andrioxarrayfor re-projection. - Add type checking with
typeguardand fixed typing issues raised bytypeguard. - Refactor
show_versionsto ensure getting correct versions of all dependencies.
v0.12.1
Release Notes
Internal Changes
- Use the three new
ar.retrieve_*functions instead of the oldar.retrievefunction to improve type hinting and to make the API more consistent.
v0.12.0
Release Notes
Breaking Changes
- Set the request caching's expiration time to never expire. Add two flags to all functions to control the caching:
expire_afteranddisable_caching.
Internal Changes
- Add all the missing types so
mypy --strictpasses. - Improve performance of
elevation_bygridby ignoring unnecessary validation.
v0.11.4
v0.11.3
Release Notes
Breaking Changes
- Rewrite the command-line interface using
click.groupto improve UX. The command is nowpy3dep [command] [args] [options]. The two supported commands arecoordsfor getting elevations of a dataframe of coordinates in EPSG:4326 CRS andgeometryfor getting the elevation of a geo-dataframe of geometries. Each sub-command now has a separate help message. The format of the input file for thecoordscommand is nowcsvand for thegeometrycommand is.shpor.gpkgand must have acrsattribute. Also, thegeometrycommand now accepts multiple layers via the--layers(-l) option. More information and examples can be in theREADME.rstfile.
New Features
- Make
fill_depressionsfunction public. This function conditions an input DEM by applying depression filling and flat area resolution operations.
Internal Changes
- The
get_mapfunction now checks for validation of the inputlayersargument before sending the actual request with a more helpful message. - Improve docstrings.
- Move
deg2mpm,fill_depressions, andreproject_gtifffunctions to a new file calledutils. Bothdeg2mpmandfill_depressionsfunctions are still accessible frompy3depdirectly. - Increase the test coverage.
v0.11.2
Release Notes
Bug Fixes
- Fix a bug related to
elevation_bycoordswhere crs validation fails if its type ispyrpoj.CRSby converting inputs with CRS types to string.
Internal Changes
- Fix a couple of typing issues and update the
get_transformAPI based on the recent changes inpygeoutilsv0.11.5.