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

martinez.union wrong response #90

Closed
Efimster opened this issue Sep 1, 2018 · 3 comments
Closed

martinez.union wrong response #90

Efimster opened this issue Sep 1, 2018 · 3 comments

Comments

@Efimster
Copy link

Efimster commented Sep 1, 2018

Hello,
martinez.union([[ [0,0],[10,0],[10,10],[0,10] ]], [[ [9,10],[21,9],[21,21],[9,21] ]])

produces
[[[ [0,0],[10,0],[10, 9.916666666666668],[21,9],[21,21],[9,21],[0,10] ]]]
Seems like should be
[[[ [0,0],[10,0],[10, 9.916666666666668],[21,9],[21,21],[9,21], [9,10] [0,10] ]]]
[9,10] point is missing

This is the result produced by polygon-clipping (https://github.com/mfogel/polygon-clipping) project:
[[ [ [ 0, 0 ],
[ 10, 0 ],
[ 10, 9.916666666666666 ],
[ 21, 9 ],
[ 21, 21 ],
[ 9, 21 ],
[ 9, 10 ],
[ 0, 10 ],
[ 0, 0 ] ] ]
]

@w8r
Copy link
Owner

w8r commented Jan 7, 2020

fixed in #111

@w8r w8r closed this as completed Jan 7, 2020
@rowanwins
Copy link
Collaborator

Turns out this isn't resolved by #111 due to a slightly dodgy demo site :(

@rowanwins rowanwins reopened this Jan 13, 2020
@rowanwins
Copy link
Collaborator

This however is resolved by using correct inputs

The arrays are missing closing coordinates (eg the first and last coord pair need to match according to the geojson spec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants