Replies: 1 comment
-
Again, what is the higher level problem you're trying to solve? It seems like you might be working at too low a level. There might be other tools that solve your problem, but I don't know what your real problem is. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to clip a great circle arc to a cell?
I see two potential approaches.
Use
S2::GetIntersection
to find intersections between cell edges and the arc. Perform additional checks to make sure that the intersection is actually on the arcs (since it appears GetIntersection returns a nearby great circle intersection). Choose two intersections appropriately.Use
bool ClipEdge(const R2Point& a, const R2Point& b, const R2Rect& clip, R2Point* a_clipped, R2Point* b_clipped);
somehow; however, this requires projecting the cell and the arc into the uv plane and I'm not sure what the precision loss will be.Beta Was this translation helpful? Give feedback.
All reactions