-
Notifications
You must be signed in to change notification settings - Fork 937
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
intersect throws an exception for simple geometries #1346
Comments
@chupacabra007 what version of Turf are you using? Sorry I can't be of further help. Maybe @rowanwins or @DenisCarriere might give you more detailed inputs on this? |
I tested it against the last version of turf. |
A version number would help as we're currently exploring some changes to this module. Are you using the full version of turf via a cdn which is v5, or have you obstacle the turf/intersect module which is in the v6 series? |
I'm using version 5.1.6 from cdn - https://npmcdn.com/@turf/[email protected]/turf.min.js |
Doh shouldn't spotted that from the error sorry @chupacabra007 Currently v5 uses jsts for it's intersect function which is known to have issues depending on your geometries. Perhaps try and run your polygon through |
I'm getting an error
|
|
I've just tried this and it seems to be working just fine. $ npm install @turf/[email protected] var fs = require('fs');
var intersect = require('@turf/intersect').default;
// feature1
// feature2
fs.writeFileSync('foo.json', JSON.stringify(intersect(feature1, feature2))); Going to close this issue since it doesn't seem to be an issue in |
Is there a minified version of turf 6? |
No unfortunately not yet. If you'd like to compile a browser ready version of the intersect code you can use something like browserify as described on the getting started page, in particular check out the section called 'Creating custom builds for use in the browser' |
Below is a code, which reproduces the error
The error message is:
What is wrong with that and can we fix it?
The text was updated successfully, but these errors were encountered: