-
Notifications
You must be signed in to change notification settings - Fork 3
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
Lgvisium 100/extract depth value error handling #107
Merged
lhaibach
merged 12 commits into
main
from
LGVISIUM-100/extract_depth_ValueError_handling
Dec 10, 2024
Merged
Lgvisium 100/extract depth value error handling #107
lhaibach
merged 12 commits into
main
from
LGVISIUM-100/extract_depth_ValueError_handling
Dec 10, 2024
Conversation
This file contains 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
stijnvermeeren-swisstopo
requested changes
Dec 4, 2024
stijnvermeeren-swisstopo
requested changes
Dec 10, 2024
stijnvermeeren-swisstopo
approved these changes
Dec 10, 2024
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.
Looks good to me
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.
Changes done:
In the extract_depth function, the ValueError handling has been incorporated, and the matched pattern are now more specific to groundwater depth. This change reduced the number of ValueErrors encountered during float conversion, which previously caused the process to exit the loop prematurely. However, this refinement has led to an increase in false positives.
To reduce these false positives, the logic for finding groundwater information has been changed. Groundwater search is now directly tied to the material description bounding box, meaning groundwater data is only search for in areas associated with material descriptions. This adjustment reduces unnecessary searches on pages without material descriptions and ensures groundwater extraction is more contextually related to material description areas. Since groundwater details can sometimes appear at the end of a page or farther from the material description, the search around the bounding box is not overly strict.
To further reduce false postitives the logic for finding lines near keys was changed (impacting coordinate, elevation, and depth extraction). Instead of searching in a rectangle ( including entries diagonal to the key), the updated code now searches along the x and y axes. This adjustment improves the F1 score for groundwater extraction while slightly worsening performance for elevation extraction (data/geoquat/validation/ A11486.pdf).
More in Ticket LGVISIUM-100