Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]#
Added#
Changed#
[0.4.0] - 2026-03-08#
Added#
- Add a new function called
elevation_bygridthat samples elevation values from the USGS 10 m seamless DEM VRT at a grid of longitude/latitude coordinates. It reads directly from Cloud-Optimized GeoTIFFs (EPSG:4269) and supports configurable resampling methods (nearest, bilinear, cubic, cubic spline, and Lanczos) via a windowed read approach. This is useful for obtaining elevation values at arbitrary point locations without downloading full tiles. - Add
numpyas an explicit dependency (previously only a transitive dependency viarasterio).
Changed#
- Improve thread safety in
get_demby opening a freshDatasetReaderper tile instead of sharing a single instance across threads. TheVRTPoolis now used only for metadata (bounds, transform, nodata), not for concurrent reads. - Add early-return optimization in
get_map: skip downloading when all requested tiles already exist on disk (consistent withget_dembehavior). - Move the
valid_typestuple inget_mapto a module-level constant (VALID_MAP_TYPES). - Simplify
tiffs_to_daby skipping the.rio.clip()step when the geometry is a bounding box, since.rio.clip_box()already handles that case. - Migrate documentation from ReadTheDocs to GitHub Pages with
mikeversioning. - Add a GitHub Actions workflow (
docs.yml) for automated documentation deployment. Pushes tomaindeploy thedevversion, and tagged releases deploy a stable version viamike. - Add a GitHub Actions workflow (
docs.yml) for automated documentation deployment. Pushes tomaindeploy thedevversion, and tagged releases deploy a stable version viamike.
[0.3.1] - 2025-02-12#
Added#
- Add a new function called
tiffs_to_dathat converts a list of GeoTIFF files to axarray.DataArrayobject. This function is useful for combining multiple GeoTIFF files thatget_mapandget_demproduce, into a singlexarray.DataArrayobject for further analysis. Note that for using this functionshapelyandrioxarrayneed to be installed. The required dependencies did not change, these two are optional dependencies that are only needed for this new function.
Changed#
- Switch to using the new TinyRetriever library that was developed partly based on this package. It has the same two dependencies and includes the same functionality with some additional features.
- Improve handling of errors when using
build_vrtfunction by explicitly catching errors raised bygdalbuildvrtand raising a more informative error message. This should make it easier to debug issues when creating VRT files.
[0.3.0] - 2025-01-20#
Changed#
- Refactor the package to run in Jupyter notebooks without using
nest-asyncio. This is done by creating and initializing a single global event loop thread dedicated to only running the asynchronous parts of this package. As a result,nest-asynciois no longer needed as a dependency. - Remove the
out_crsoption fromget_mapsince the 3DEP service returns inconsistent results when the output CRS is not its default value of 3857. This is a breaking change since this value cannot be configured and the default value has changed from 5070 to 3857.
[0.2.3] - 2025-01-18#
Changed#
- Use
aiohttpandaiofilesfor more performant and robust handling of service calls and downloading of 3DEP map requests. This should limits the number of connections made to the dynamic 3DEP service to avoid hammering the service and can reduce the memory usage when downloading large files. As a results,aiohttpandaiofilesare now required dependencies andurllib3is no longer needed. - More robust handling of closing
VRTPoolat exit by creating a new class method calledclose. This method is called by theatexitmodule to ensure that the pools are closed when the program exits.
[0.2.2] - 2025-01-13#
Changed#
- Considerable improvements in making service calls by creating connection pools using
urllib3.HTTPSConnectionPoolandrasterio.open. This should improve performance and robustness of service calls, and reduce the number of connections made to both the static and dynamic 3DEP services. As a results,urllib3is now a required dependency. - Add a new private module called
_poolsthat contains the connection pools for making service calls. The pools are lazily initialized and are shared across threads. Especially the VRT pools are created only when a specific resolution is requested, and are reused for subsequent requests of the same resolution. As such, the VRT info are loaded only once per resolution without usinglru_cache.
[0.2.1] - 2025-01-11#
Changed#
- Improve downloading of 3DEP map requests in
get_mapby streaming the response content to a file instead of loading it into memory. Also make exception handling more robust. The function has been refactored for better readability and maintainability. - Change the dependency of
build_vrtfromgdaltolibgdal-coreas it is more lightweight and does not require the fullgdalpackage to be installed. - Improve documentation.
[0.2.0] - 2025-01-08#
Changed#
- Since 3DEP web service returns incorrect results when
out_crsis 4326,get_mapwill not accept 4326 for the time being and the default value is set to 5070. This is a breaking change. - Improve exception handling when using
ThreadPoolExecutorto ensure that exceptions are raised in the main thread.
[0.1.0] - 2024-12-20#
- Initial release.