Skip to content

spatial Voellmy friction model: add VariableVoellmyShapeToRaster to generate rasters from shapes [com6]#1074

Merged
fso42 merged 5 commits into
masterfrom
VariableVoellmyShapeToRaster
Jun 16, 2026
Merged

spatial Voellmy friction model: add VariableVoellmyShapeToRaster to generate rasters from shapes [com6]#1074
fso42 merged 5 commits into
masterfrom
VariableVoellmyShapeToRaster

Conversation

@dwolfsch

@dwolfsch dwolfsch commented Jan 23, 2025

Copy link
Copy Markdown
Contributor

Adds functionality for generating raster files for mu and
xsi values from a DEM and shapefiles including:
A main script to rasterize mu and xsi based on polygon shapefiles and attribute fields.
A corresponding run script and configuration file for user customization

  • as with the other PR add input setup for files -> @dwolfsch

@pep8speaks

Copy link
Copy Markdown

Hello @dwolfsch! Thanks for opening this PR.

Line 20:1: E302 expected 2 blank lines, found 1

Line 431:52: E203 whitespace before ':'
Line 429:48: E203 whitespace before ':'
Line 428:48: E203 whitespace before ':'
Line 143:35: W291 trailing whitespace

Line 54:1: E305 expected 2 blank lines after class or function definition, found 1
Line 15:1: E302 expected 2 blank lines, found 1

Do see the Hitchhiker's guide to code style

@qlty-cloud-legacy

Copy link
Copy Markdown

Code Climate has analyzed commit d5624ec and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 8.9% (50% is the threshold).

This pull request will bring the total coverage in the repository to 69.0%.

View more on Code Climate.

@fso42 fso42 self-requested a review January 24, 2025 08:37
@fso42 fso42 added the enhancement New feature or request label Jan 24, 2025
@fso42 fso42 changed the title spatial Voellmy friction model: add VariableVoellmyShapeToRaster to generate rasters from shapes spatial Voellmy friction model: add VariableVoellmyShapeToRaster to generate rasters from shapes [com6] Jan 29, 2025
Comment thread avaframe/com6RockAvalanche/variableVoellmyShapeToRaster.ini Outdated
Comment thread avaframe/com6RockAvalanche/variableVoellmyShapeToRaster.ini Outdated
Comment thread avaframe/com6RockAvalanche/variableVoellmyShapeToRaster.py Outdated
Comment thread avaframe/runVariableVoellmyShapeToRaster.py Outdated
@fso42 fso42 force-pushed the VariableVoellmyShapeToRaster branch 2 times, most recently from d0b39ae to db4517d Compare November 17, 2025 13:55
@qltysh

qltysh Bot commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

All good ✅

Comment thread avaframe/in3Utils/spatialVoellmyInputs.py
Comment thread avaframe/tests/test_spatialVoellmyInputs.py
@qltysh

qltysh Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Qlty


Coverage Impact

⬆️ Merging this pull request will increase total coverage on master by 0.08%.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
New Coverage rating: A
avaframe/in3Utils/spatialVoellmyInputs.py96.4%48, 53
Total96.4%
🤖 Increase coverage with AI coding...
In the `VariableVoellmyShapeToRaster` branch, add test coverage for this new code:

- `avaframe/in3Utils/spatialVoellmyInputs.py` -- Lines 48 and 53

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

dwolfsch and others added 4 commits June 16, 2026 10:07
…enerate rasters from shapes

Adds functionality for generating raster files for mu and
xsi values from a DEM and shapefiles including:
A main script to rasterize mu and xsi based on polygon shapefiles and attribute fields.
A corresponding run script and configuration file for user customization.
- Updated `variableVoellmyShapeToRasterCfg.ini` to use `mu` and `xsi` instead of Unicode characters for clarity.
- Modified `avaframeCfg.ini` to set a default path for `avalancheDir`.
…ShapeToRaster` workflow

- Removed `variableVoellmyShapeToRaster` scripts and related configurations.
- Introduced `spatialVoellmyInputs` for handling spatial Voellmy friction parameter generation.
- Migrated default input values to `spatialVoellmyInputsCfg.ini` with updated defaults.
- Replaced inline raster generation logic with standardized utility functions.
@fso42 fso42 force-pushed the VariableVoellmyShapeToRaster branch from 5edb6bc to 171fc17 Compare June 16, 2026 08:07
@fso42 fso42 requested a review from awirb June 16, 2026 08:22
Comment thread avaframe/in3Utils/spatialVoellmyInputs.py
Comment thread avaframe/in3Utils/spatialVoellmyInputs.py Outdated
Comment thread avaframe/in3Utils/spatialVoellmyInputs.py
…ing and improve docs

- Replaced `float` casting with `getfloat` for cleaner configuration parsing.
- Updated `_rasterizeShapefile` docstring to clarify default cell value behavior.
@fso42 fso42 merged commit 17e2643 into master Jun 16, 2026
2 checks passed
@fso42 fso42 deleted the VariableVoellmyShapeToRaster branch June 16, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants