question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong booleanDisjoint where a line is completely contained within a poly

See original GitHub issue

booleanDisjoint 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DenisCarrierecommented, Jan 30, 2018

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/

0reactions
ath0mascommented, Jan 27, 2018

@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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found