- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4
scarpUpdate #1168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scarpUpdate #1168
Conversation
Run file for com6RockAvalanche Scarp
Config-File for scarp.py
Scarp.py creates scarps, that can be used as an Input for com6RockAvalanche
- Refactored `runCom6Scarp.py` to accept an input directory instead of a configuration file path. - Added TODO comments for further improvements in `scarp.py`, `scarpCfg.ini`, and `runCom6Scarp.py` regarding default parameter handling and output file management.
- Implement shapefile input for feature coordinates and perimeter. - Remove raster input options for coordinates and perimeter. - Adapt `scarp.py` to use new input method and updated config. - Adjust `runCom6Scarp.py` to use refactored `scarp.py` functions. - Remove obsolete output paths from config file.
Run file for com6RockAvalanche Scarp
Config-File for scarp.py
Scarp.py creates scarps, that can be used as an Input for com6RockAvalanche
- Refactored `runCom6Scarp.py` to accept an input directory instead of a configuration file path. - Added TODO comments for further improvements in `scarp.py`, `scarpCfg.ini`, and `runCom6Scarp.py` regarding default parameter handling and output file management.
- Implement shapefile input for feature coordinates and perimeter. - Remove raster input options for coordinates and perimeter. - Adapt `scarp.py` to use new input method and updated config. - Adjust `runCom6Scarp.py` to use refactored `scarp.py` functions. - Remove obsolete output paths from config file.
- Implement shapefile input for feature coordinates and perimeter. - Adapt Readme - commit includes test data in data/scarpExample
- Run file for com6RockAvalanche Scarp - Create scarpCfg.ini - Config-File for scarp.py - Create scarp.py - scarp.py creates scarps, that can be used as an Input for com6RockAvalanche - com6RockAvalanche: update scarp.py, runCom6Scarp.py & scarpCfg.ini, add readme
- Refactored `runCom6Scarp.py` to accept an input directory instead of a configuration file path. - Added TODO comments for further improvements in `scarp.py`, `scarpCfg.ini`, and `runCom6Scarp.py` regarding default parameter handling and output file management. feat(com6RockAvalanche): implement shapefile input for scarp - Implement shapefile input for feature coordinates and perimeter. - Remove raster input options for coordinates and perimeter. - Adapt `scarp.py` to use new input method and updated config. - Adjust `runCom6Scarp.py` to use refactored `scarp.py` functions. - Remove obsolete output paths from config file.
…fo; remove codeclimate - Add instructions for input files, including elevation DEM and shapefile - Specify output files and their locations in the directory structure - Include steps for preparing the configuration file for scarp calculations - Clarify the usage of the script for running SCARP calculations
Updates the ellipsoid function of the scarp script.
| if 0 <= center_row < n and 0 <= center_col < m: | ||
| slopeAzimuth = slopeDir[center_row, center_col] | ||
| slopeAzimuth = (slopeAzimuth + 2 * np.pi) % (2 * np.pi) | ||
| slopeMag = slopeMagnitude[center_row, center_col] | ||
|  | ||
| if not np.isnan(slopeAzimuth) and slopeMag > 0: | ||
| normal_dx = np.cos(slopeAzimuth) | ||
| normal_dy = np.sin(slopeAzimuth) | ||
| slopeAngle = math.atan(slopeMag) | ||
| dxOffset = -offset[k] * normal_dx * math.sin(slopeAngle) | ||
| dyOffset = -offset[k] * normal_dy * math.sin(slopeAngle) | ||
| dzOffset = -offset[k] * math.cos(slopeAngle) | ||
| else: | ||
| dxOffset = dyOffset = dzOffset = 0 | ||
| else: | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if distance <= 1: | ||
| baseDepth = maxDepth[k] * (1 - distance) | ||
| tiltEffect = math.tan(math.radians(tilt[k])) * ( | ||
| dxRot * np.cos(tiltDir[k]) + dyRot * np.sin(tiltDir[k]) | ||
| ) | ||
| totalDepth = baseDepth + tiltEffect + z0 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| maxdepth_value = value | ||
| if name == "semimajor": | ||
| semimajor_value = value | ||
| if name == "tilt": | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| semimajor_value = value | ||
| if name == "tilt": | ||
| tilt_value = value | ||
| if name == "direc": | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| tilt_value = value | ||
| if name == "direc": | ||
| direc_value = value | ||
| if name == "offset": | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| closing in favor of #1172 | 
Updates the ellipsoid method of the scarp script, so that users can now define more specific ellispoids