-
Notifications
You must be signed in to change notification settings - Fork 25
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
Polygon Returning Incorrect Result #6
Labels
Comments
I get the same issue, but worse, I think it is when the first (and maybe last) edge of the polygon crosses into the bounding box. Here is code:
results:
Note: that while the input is closed polygon ring, the output endpoints do not match. |
Sorry, my issue is different. I had a similar related issue but got confused :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For this test case polygon() seems to return an incorrect result:
// Bounding box var bbp = [-123.5006568260586, -268.5301901840667, -113.19703085688374, -261.59299895444263]; // Test polygon var poly = [ [-127.7861230010377, -316.24149777631044], [-116.70896693414316, -294.6055724833417], [-112.85776301568613, -270.41743161420106], [-108.94104548638926, -246.3102843974042], [-113.9284569854127, -222.40054013470888], [-100.48054530104075, -224.3864178730988], [-95.49313380201731, -248.2961621357941], [-99.40985133131419, -272.40330935259095], [-103.26105524977122, -296.5914502217316], [-114.33821131666575, -318.2273755147003] ]; let t1 = lineclip.polyclip(poly, bb); // t1 = [[-113.19703085688374, -268.5301901840667], [-113.19703085688374, -261.59299895444263], [-113.19703085688374, -261.59299895444263], [-113.19703085688374, -268.5301901840667]];
Note that the x coordinate of the intersection box is exactly xmax. It looks to me like the polygon hits the bounding box in exactly the upper right corner. I think that case should return no intersection or just the point intersection, but what actually gets returned is the entire right side of the bounding box.
The text was updated successfully, but these errors were encountered: