Wrong booleanDisjoint where a line is completely contained within a poly
See original GitHub issuebooleanDisjoint returns true when testing with a line completely contained within a poly. Expecting result to be false instead.
Example (turf v5.1.6):
var line1 = turf.lineString([[80, 60], [120, 135]]);
var poly1 = turf.polygon([[[50, 50], [50, 150], [150, 150], [150, 50], [50, 50]]]);
turf.booleanDisjoint(line1, poly1); // returns true, should return false
turf.booleanDisjoint(poly1, line1); // same
// while contains works properly
turf.booleanContains(poly1, line1); // returns true, correct
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Advanced geospatial analysis - Turf.js
Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach() (Multi)Point geometries do not contain segments therefore they are ignored ...
Read more >simplepolygon - Cesium Documentation
Boolean-contains returns True if the second geometry is completely contained by the first geometry. The interiors of both geometries must intersect and, ...
Read more >turf/boolean-contains reports false, even though one geometry ...
As you can see by pasting it to geojson.io for example, one - smaller geometry is fully contained in another - bigger one....
Read more >@turf/boolean-disjoint - npm Package Health Analysis | Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >@turf/boolean-contains | Yarn - Package Manager
GitHub Actions Status Version Badge Gitter chat Backers on Open ... @turf/dissolve Complete rewrite of the dissolve module to resolve many bugs (PR ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Published this change as a patch
v5.1.6
I think we will be skipping the next minor release and hopping over to
v6.x
right away (too many things will change).https://unpkg.com/@turf/boolean-disjoint@5.1.6/
@DenisCarriere @rowanwins PR #1230 merged, thanks! and I see it tagged as “5.2.0 milestone”: possible to get it in a 5.x release? (and not forced to update to next major 6.x)