-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Coordinate sanity check #716
Conversation
👋 Thank you for contributing. A staging environment for this PR for this change will be available shortly |
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.
- I think there are different approaches which could catch more errors than just overlaying a rectangle globally.
This check will, for example, not find if there is one room far, far outside the bounds of a building.
A distance-based approach with either hardcoded or inferred distance from the room-corpus is a better approach:I would prefer an approach which infers the distance based on a percentile of the data * constant factorif (distance_to_parent(data) > infered_maximum_distance_between_room_and_parent[...]):
- with the current approach, this won't build for
-> I would prefer these issues to be addressed in this PR.
This can be done by- deleting the coordinates (override with no coordinate),
- overriding with the parent,
- overriding with a manually inferred/accurate coordinate or
- making this a warning instead of a
Exception
085990a
to
5183838
Compare
(sorry, I accidentally rebased your branch too instead of merging into it) |
I agree that this approach is quite inaccurate. I was not sure if I could assume building locations to be correct. That opens up way better solutions. |
I am not sure I understand this right. Does this mean values should be accepted, if a certain percentile of rooms is close enough nearby? |
…s3' into validate_coordinates3
All building locations can be assumed to be correct and are to some part manually sourced. |
Well, there are a lot of rooms in 0510 that are about 2km away from their building. Looking at the 0510 coords, I'd assume that that one is incorrect though. What do you think is a good maximum distance? I did some test runs, and it looks like all correct values are easily within 100m, so I'd suggest that. |
…verride coordinates in coords_override.json
I think this is now at a point where I can say that I am happy with the solution. |
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.
I have made some style-inline comments.
There are still quite a lot of linting issues in this PR. Please run the linter (included in pre-commit
, see the Readme for further details) next time before requesting a review ^^
Honestly, this was not intentional. I have changed a setting and this should not be possible anymore. |
I thought, if I have installed that, it would automatically run? Is there a way to only run it for a single file? --all-files bloats my changes log with other files that then prevent me from switching branches until I delete them again.
I did think that was a bit much😅 |
…, deleted coords_override.json
Thank you for implementing this ❤️ |
Resolves #131
Proposed Changes (include Screenshots if possible)
checks if coordinates are within this window. If not, throw exception (maybe deleting the coords attibute works too? I noticed the interactive map shows munich if theres no coords field provided)computes for each room the distance to its parent building and checks if it is <100m. If not, writes a warning.
allows for overriding of building coordinates in coords_override.json
How to test this PR
How has this been tested?
^
Checklist