Add function to simplify fault geometry#35
Merged
lispandfound merged 25 commits intomainfrom Mar 27, 2025
Merged
Conversation
Contributor
Author
Contributor
Author
|
To produce those images I wrote a new function |
sungeunbae
reviewed
Mar 18, 2025
joelridden
previously approved these changes
Mar 21, 2025
AndrewRidden-Harper
previously approved these changes
Mar 25, 2025
Contributor
AndrewRidden-Harper
left a comment
There was a problem hiding this comment.
Looks good. I noticed a small typo in a comment
Co-authored-by: AndrewRidden-Harper <52001209+AndrewRidden-Harper@users.noreply.github.com>
1596f58
sungeunbae
approved these changes
Mar 26, 2025
AndrewRidden-Harper
approved these changes
Mar 26, 2025
joelridden
approved these changes
Mar 27, 2025
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 introduces the function
simply_fault, which intelligently removes faults with small widths by absorbing small segments into their neighbours. It picks the neighbour to absorb into by minimising the deviation from the original fault geometry. The function is hypothesis tested for the following properties:xkm contains no segments smaller thanxkm.ksegments of length less thanxis simplified to a containinglen(faults) - ksegments, unless the fault has multiple consecutive segments of length less thanx. Consecutive segments make the maths more difficult.The relatively relaxed 80% condition is chosen because simplifying faults can result in pathological outliers when you have small faults containing few segments. For example, here is an example hypothesis testing finds if the threshold is 90%
The black is the original fault, and the red the simplified fault. The black fault contains a very small segment with a sharp change in direction. The red fault approximates the final fault in the only way it can, by creating a fault from the start to the end. But this fault has a larger difference in area than 90%. Unfortunately there isn't a way around this, it needs to be up to the caller to ensure the simplification does not produce one of these outlier cases.