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

problem with S2loop::init #336

Open
catmagic opened this issue Dec 19, 2023 · 2 comments
Open

problem with S2loop::init #336

catmagic opened this issue Dec 19, 2023 · 2 comments

Comments

@catmagic
Copy link

Hi,
the program crashes on the correct data, namely, a call on a very narrow quadrilateral causes a crash and the error: ERROR Edge 1 crosses edge 3.
this is the quadrilateral
-1.0780749761978428 1.4688488034282494
-1.0780759735047707 1.4666611693199976
-0.981471670584179 -3.0839249353037306
-0.9814705651439662 -3.081737300942303

@smcallis
Copy link
Collaborator

smcallis commented Dec 19, 2023

So edges 1 and 3 would be edges:

(-1.0780759735047707, 1.4666611693199976)-(-0.981471670584179, -3.0839249353037306) and 
(-0.9814705651439662, -3.081737300942303)-(-1.0780749761978428, 1.4688488034282494) 

which don't cross when I test them manually.

Can you print the individual S2Points that form the polygon with
fprintf(stderr, "%.18e %.18e %.18e\n", pnt.x(), pnt.y(), pnt.z());?
That'll give me full precision on the actual points in the polygon so I can
check them.

@jmr
Copy link
Member

jmr commented Jan 10, 2024

@catmagic Alternatively, can you add a test case to s2loop_test.cc that demonstrates the problem? Having runnable code will make this easier to debug.

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

No branches or pull requests

3 participants