Add a standalone slope filtering pipeline and update bbox parsing#49
Open
cmspeed wants to merge 9 commits into
Open
Add a standalone slope filtering pipeline and update bbox parsing#49cmspeed wants to merge 9 commits into
cmspeed wants to merge 9 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a standalone pipeline for generating slope-filtered versions of DIST-HLS and RTC products (
opera-disaster slope-filter). The output is identical to theopera-disaster runwhen-m landslideand-stare specified; however, the key difference is the input to the slope filtering are either (1) local OPERA DIST-HLS / RTC granules or (2) local OPERA DIST-HLS / RTC mosaics. The standalone slope filtering automatically obtainsB10_DEM.tiflayers covering the AOI from the OPERA DSWx-HLS and generates adem.tifandslope.tif. The slope.tif is used to mask pixels less than-st.This PR also standardizes bounding box parsing across the CLI (i.e.,
run,search,download,mosaic)Changes
run_slope_filter_onlyto generate slope-filtered outputs within a local directory.apply_slope_mask_to_rasterto dynamically reproject theslope.tifmask to match any target raster's specific grid in-memory, ensuring slope filtering can be done on both individual granules and mosaics.fetch_missing_demsto ensure all DEMs (from DSWx-HLS, band 10) are downloaded to the local directory before proceeding.get_local_spatial_propertiesto extract CRS and bounds directly from raster headers usingrasterio, rather than relying on OPERA text metadata.parse_bbox_inputhelper.-ito-ldfor CLI consistency.How to run
Here is a scenario for which the standalone slope filtering could be applied.
(1) Download DIST-HLS / RTC granules locally:
(2) Create daily mosaics from the input granules:
(3) Apply a slope filter to the mosaics and save the new outputs in a subdirectory: