Skip to content

[monitorlib/geo] Improve accuracy of geospatial point translation#1510

Open
BenjaminPelletier wants to merge 2 commits into
interuss:mainfrom
BenjaminPelletier:remove-flattening
Open

[monitorlib/geo] Improve accuracy of geospatial point translation#1510
BenjaminPelletier wants to merge 2 commits into
interuss:mainfrom
BenjaminPelletier:remove-flattening

Conversation

@BenjaminPelletier

@BenjaminPelletier BenjaminPelletier commented Jun 14, 2026

Copy link
Copy Markdown
Member

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_center that is logically a LatLngPoint. 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 Optional marker on Polygon (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.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review June 15, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant