-
Notifications
You must be signed in to change notification settings - Fork 942
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
turf.intersect raises "uncaught exception: [object Object]" on valid geometries #820
Comments
Your coordinates should be in decimal degrees (WGS84 projection). Please don't hesitate to reopen this issue if this is not resolved after the coordinate conversion is done. |
Thanks! Did not know that. I will check it in a minute |
👍 I'm assuming that |
I managed to reproduce this error with WGS84 coordinates. Here is a new test case:
|
I have a long list of real world features and turf.intersect works perfect, until it hits this second feature. And it does not really matter what the first feature is, it may be absolutely arbitrary. |
It seems like I have no rights to reopen this issue. |
🤦♂️ Ops.. strange you can't reopen (my bad). |
Oh I get it... looks like the intersection is "empty". http://geojson.io/#id=gist:anonymous/1c584a17eac2f8f16c2cd4b6fa3fe664&map=11/56.2606/43.8558 I'm also getting a
|
@vicvolk I read on the
Don't know exactly how to use turf.intersect({"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":
[[[43.741513,56.202221],[43.742371,56.188564],[43.777562,56.187608],
[43.779278,56.196396],[43.763142,56.202125],[43.741513,56.202221]]]}},
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":
[[[43.970066,56.332893],[43.970066,56.332893],[43.969073,56.332160],
[43.967127,56.332967],[43.967599,56.333312],[43.969557,56.333510],
[43.969581,56.333433],[43.969613,56.333362],[43.969647,56.333304],
[43.969685,56.333245],[43.969731,56.333186],[43.969791,56.333117],
[43.969832,56.333078],[43.969883,56.333031],[43.969928,56.332993],
[43.969975,56.332957],[43.970028,56.332919],[43.970066,56.332893]]]}});
// undefined @DenisCarriere should we |
With our recent
|
What I meant was applying it to the inputs (with no mutation), in order to avoid this issue with |
Is this error happening all the time? Yes I know that we would be adding it to the inputs, but wouldn't that slow things down if it's not needed.
|
To-Do
Feature<null>
instead of returningundefined
.@turf/truncate
to inputs.To reproduce this error message (which I believe should not be raised), just run this code:
The whole problem is with the second feature and I'm not sure what may be wrong with it.
The text was updated successfully, but these errors were encountered: