[monitorlib/geo] Improve accuracy of geospatial point translation#1510
Open
BenjaminPelletier wants to merge 2 commits into
Open
[monitorlib/geo] Improve accuracy of geospatial point translation#1510BenjaminPelletier wants to merge 2 commits into
BenjaminPelletier wants to merge 2 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 improves translation of geospatial points by rotating 3d points on the surface of a sphere rather than locally flattening and unflattening, as suggested in #1468. This is far more physically-accurate and should eliminate the problems encountered in #1468 without introducing a new type of distortion in the set of points.
All the flight intents in a FlightIntentsCollection are now bound to transform together (with common reference centers) to avoid transforming individual intents differently leading to loss of close relative characteristics (like being very close together but not overlapping). To accomplish this, Transformations need an optional
reference_centerthat is logically aLatLngPoint. However, this means transformations can no longer be defined in a separate file because geo.py references transformations.py and then transformations.py would reference geo.py (for the LatLngPoint). So, this PR moves the small amount of transformations.py content into geo.py since geo.py combines data structure definitions with operation implementations (and therefore makes it harder to separate the two).It also fixes a bug where the lat and lng were swapped for circles. This was likely not detected before because circles are so rarely used as planar geometries for volumes.
It also fixes an incorrect
Optionalmarker onPolygon(Polygon wouldn't make sense without vertices).The content of prober/test_geo.py (certainly in the wrong location) is moved into geo_test.py along side geo.py which it tests.