Skip to content

Releases: VU-IVM/DamageScanner

v1.0.1

04 Mar 19:05

Choose a tag to compare

v1.0.1 — Patch Release

This patch fixes two bugs in the vector damage calculation pipeline.

MultiLineString geometry support (_convert_to_meters)
Vector features with MultiLineString geometries were not handled correctly, causing failures during length conversion. The fix extracts the first component geometry (.geoms[0]) before proceeding with the geodesic length calculation.

Cell area estimation for meter-based CRS (_get_cell_area_m2)
When the features were provided in a projected coordinate system (meters rather than degrees), the cell area estimation produced NaN values. The fix reprojects the asset point to the hazard CRS before buffering, ensuring valid area estimates regardless of the input coordinate system.

v1.0.0

20 Feb 07:52

Choose a tag to compare

DamageScanner v1.0.0 Release Notes

🎉 First Major Release

We're excited to announce DamageScanner v1.0.0! This release marks a major milestone with comprehensive testing, new features, and improved stability.


New Features

Improved NetCDF Hazard Support

  • Full support for NetCDF climate and hazard data (.nc files)
  • Handles various NetCDF structures (with band, z, or other dimensions)
  • Robust CRS detection with fallback for files without EPSG codes

New Parameters

  • extract_strategy: Choose between "feature-sequential" and "raster-sequential" for exactextract processing
  • return_full: Option to return all features, not just those with hazard exposure (useful for mapping)

Vector-Vector Overlay

  • New _overlay_vector_vector function for damage assessment using vector hazard data (e.g., flood polygons from hydraulic models)
  • Supports polygon, line, and point exposure features
  • Automatic CRS reprojection to metric coordinates for accurate area/length calculations

Bug Fixes

Core Calculations

  • Fixed discrepancies between gridded and non-gridded approaches - both methods now produce consistent results
  • Fixed _convert_to_meters() - now correctly uses pyproj.Geod for accurate geodesic length calculations
  • Fixed np.trapz deprecation by updating to np.trapezoid

Data Processing

  • Fixed point geometry handling - proper dtype conversion for values and coverage columns
  • Fixed xarray DataArray detection to avoid calling .to_dataarray() on already-converted data
  • Fixed buildings extraction from OSM to use multipolygons only (building points are POI markers, not footprints)
  • Fixed invalid OSM geometry handling with on_invalid="ignore"
  • Fixed parquet file reading in VectorExposure

CRS Handling

  • Added _crs_is_meters() helper function for robust CRS unit detection
  • Fixed crashes when NetCDF files lack valid EPSG codes
  • Improved CRS fallback to EPSG:4326 when undefined

Data Consistency

  • Added _ensure_list() helper to guarantee consistent list output for values and coverage columns
  • Fixed numpy array vs Python list inconsistency from exactextract
  • Fixed _convert_to_meters() to handle empty, None, and NaN coverage values

Other Fixes

  • Fixed object_col parameter not being passed through VectorScanner
  • Fixed asset_type filtering to only apply for OSM data (not user-provided vector files)
  • Replaced bare except: with except Exception: for proper error handling
  • Fixed FutureWarning for rio.set_crs()rio.write_crs()

Testing Infrastructure

Comprehensive Test Suite

  • 137+ tests covering all major functionality
  • test_core.py - DamageScanner class, raster/vector/OSM workflows
  • test_raster.py - RasterScanner functions
  • test_vector.py - VectorScanner, VectorExposure, vector-vector overlay
  • test_utils.py - Utility functions
  • test_osm.py - OSM data extraction
  • test_download.py - Download functions (mocked)

Continuous Integration

  • GitHub Actions workflow for automated testing on every push/PR
  • Ruff formatting and linting checks
  • Test markers for slow tests (@pytest.mark.slow)

Documentation

Example Notebooks

Five new example notebooks demonstrating key workflows:

  1. Raster Damage Assessment - Basic flood damage with raster data
  2. Vector Damage Assessment - Vector exposure with raster hazard
  3. OSM Infrastructure Assessment - Roads, buildings, and critical infrastructure
  4. NetCDF Hazard Assessment - Climate data (windstorms, etc.)
  5. Risk Assessment - Expected Annual Damage from multiple return periods

Updated Documentation

  • New GitHub Pages documentation site
  • Updated README with CI badges (tests, docs, linting)
  • Improved docstrings throughout the codebase

Breaking Changes

  • VectorExposure now returns 5 values instead of 4 when using the is_osm flag (if you destructure the return value)
  • Default behavior for return_full may affect downstream code expecting only exposed features

Contributors


v1.0.0b3

19 Feb 16:52
cd0a4e7

Choose a tag to compare

Merge pull request #54 from VU-IVM/jens-test-lower-numpy

test lower numpy bound

1.0.0b2

18 Feb 17:08

Choose a tag to compare

v1.0.0b2

support python 3.14

v1.0.0b1

17 Feb 07:21

Choose a tag to compare

set version to b1

v0.9-beta.25

13 Feb 10:49

Choose a tag to compare

v0.9-beta.25 Pre-release
Pre-release

v0.9beta.23

14 Aug 11:44
3116965

Choose a tag to compare

v0.9beta.23 Pre-release
Pre-release

v0.9beta.22

14 Aug 11:39

Choose a tag to compare

v0.9beta.22 Pre-release
Pre-release

v0.9beta.21

14 Jul 10:26

Choose a tag to compare

v0.9beta.21 Pre-release
Pre-release
update uv lock

v0.9beta.20

26 May 18:16

Choose a tag to compare

v0.9beta.20 Pre-release
Pre-release