Skip to content
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

implement universal solution for kml viewpoint #771

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tsteven4
Copy link
Collaborator

@tsteven4 tsteven4 commented Nov 26, 2021

The existing bounding box used to create the kml viewpoints has problems at the poles and antimeridian. It aslo has problems at whenever the bounding box has both positive and negative longitudes, even around the prime meridian.

The intent is to solve these issues in a universal way, that works for all sets of points on the earth. Specifically, it works for points around the antimeridian and points around the poles. We also fix the bug around the prime meridian.

The proposed solution uses Welzl's algorithm to find the minimum bounding "circle" (actually a spherical cap) of the points. It implements this in n-vector space. Welzl's algorithm is O(n), so this solution should scale. I beleive the combination of the Welzl algorithm with n-vector representation of position is novel.

At present there are some reproducibility issues due to randomization of the order of the points. This appears to introduce very small errors in some of the reference files.

Use welzl's algorithm and nvectors to find the latitude, longitude,
and range for the camera.  This works everywhere on earth, including
the antimeridian and poles.
There is a reproducibility issue with very small changes depeding
on the randomization.
@tsteven4 tsteven4 marked this pull request as draft November 26, 2021 16:11
Also, only print kml range to the millimeter instead of micrometer.
At the micrometer level the range could depend on the randomization
of the points for the welzl algorithm.
@GPSBabelDeveloper GPSBabelDeveloper changed the title implement univeresal solution for kml viewpoint implement universal solution for kml viewpoint Nov 27, 2021
@tsteven4
Copy link
Collaborator Author

At the moment regression passes except for 64 bit windows builds. They fail with a stack overflow.

More critically, the expected linear performance has not been realized.

@tsteven4
Copy link
Collaborator Author

performance appears linear if the set of points is in a hemisphere. However, if the set of points does not fit in any half sphere it becomes very non-linear.

memory utilization also seems to be an issue somewhere above 10,000 points.

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