Skip to content

[com4] use raster functions (for .asc and .tif) from AvaFrame#1095

Merged
fso42 merged 1 commit into
masterfrom
PS_com4_rasterUtils
May 20, 2025
Merged

[com4] use raster functions (for .asc and .tif) from AvaFrame#1095
fso42 merged 1 commit into
masterfrom
PS_com4_rasterUtils

Conversation

@PaulaSp3
Copy link
Copy Markdown
Contributor

@PaulaSp3 PaulaSp3 commented Feb 21, 2025

  • use the raster - functions from avaframe.in2Trans.rasterUtils and avaframe.in1Data.getInput instead of avaframe.com4FlowPy.raserIo
  • avaframe.com4FlowPy.raserIois not needed anymore (can be deleted, not done yet..)
  • the only differences I recognized:
    • when writing rasterData now the noData values (before: nodata: -9999) -> but I still could change the if required
    • we flip upside down the rasters when reading in and writing, when doing that consistently, I could not recognize a problem yet.

@PaulaSp3 PaulaSp3 added enhancement New feature or request flowPyDev Ideas for future development labels Feb 21, 2025
@PaulaSp3 PaulaSp3 requested a review from ahuber-bfw February 21, 2025 10:17
@PaulaSp3 PaulaSp3 linked an issue Feb 21, 2025 that may be closed by this pull request
@fso42 fso42 changed the title com4: use raster functions (for .asc and .tif) from AvaFrame [com4] use raster functions (for .asc and .tif) from AvaFrame Feb 27, 2025
@PaulaSp3 PaulaSp3 force-pushed the PS_com4_rasterUtils branch 2 times, most recently from b061a45 to 87a8175 Compare March 20, 2025 11:10
Comment thread avaframe/com4FlowPy/splitAndMerge.py Outdated
@qltysh
Copy link
Copy Markdown
Contributor

qltysh Bot commented May 15, 2025

All good ✅

Comment thread avaframe/com4FlowPy/com4FlowPy.py Outdated
Comment thread avaframe/com4FlowPy/com4FlowPy.py
@PaulaSp3 PaulaSp3 force-pushed the PS_com4_rasterUtils branch from 5a099fa to 99d7745 Compare May 16, 2025 07:55
Comment thread avaframe/com4FlowPy/com4FlowPy.py Outdated
Comment thread avaframe/com4FlowPy/com4FlowPy.py Outdated
Comment thread avaframe/com4FlowPy/com4FlowPy.py Outdated
@PaulaSp3 PaulaSp3 force-pushed the PS_com4_rasterUtils branch from debfa7e to 4b5b4d4 Compare May 16, 2025 08:02
Comment thread avaframe/com4FlowPy/com4FlowPy.py Outdated
@qltysh
Copy link
Copy Markdown
Contributor

qltysh Bot commented May 16, 2025

Diff Coverage: The code coverage on the diff in this pull request is 0.0%.

Total Coverage: This PR will increase coverage by 0.05%.

🛟 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.

Comment thread avaframe/com4FlowPy/com4FlowPy.py
Copy link
Copy Markdown
Contributor

@ahuber-bfw ahuber-bfw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :) - I made some comments and pushed some minor changes --> overall this looks good and works for all the cases I tested it with:

  • useCustomPaths = False
  • useCustomPaths = True with release area as .tif und .shp
  • with "clipped" DEM (i.e. there are nodata_values in some areas of the dem extent)
  • with and without forest and infra

only thing I didn't test was the variable Input Layers (variableAlpha, variableUmaxLim, variableExponent) - but this should also be fine based on the other tests.

thx for the effort @PaulaSp3

Comment thread avaframe/com4FlowPy/com4FlowPy.py Outdated
Comment thread avaframe/com4FlowPy/splitAndMerge.py
Comment thread avaframe/com4FlowPy/com4FlowPy.py
Comment thread avaframe/com4FlowPy/com4FlowPy.py Outdated
@fso42 fso42 added this to the Version 1.13 milestone May 20, 2025
@PaulaSp3 PaulaSp3 force-pushed the PS_com4_rasterUtils branch from 0477eed to bf74ef1 Compare May 20, 2025 08:28
outputfile format set in ini - file

add warning

minor modifications to flowCOre and SPAM to deal with noData handling in alignment with prior code-base

changed output nodata_vale to -9999 instead of DEM value

changed output nodata_vale to -9999 instead of DEM value

delete comment

deleted unused local variable 'release'
@PaulaSp3 PaulaSp3 force-pushed the PS_com4_rasterUtils branch from bf74ef1 to 04a4c3d Compare May 20, 2025 08:29
@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit 04a4c3d and detected 0 issues on this pull request.

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

This pull request will bring the total coverage in the repository to 69.8% (0.0% change).

View more on Code Climate.

@fso42 fso42 merged commit 2b715c6 into master May 20, 2025
6 of 7 checks passed
@fso42 fso42 deleted the PS_com4_rasterUtils branch May 20, 2025 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request flowPyDev Ideas for future development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor com4 for new rasterUtils with tiff support

3 participants