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.

Improve booleanOverlap docs

See original GitHub issue

I am having this polygon:

const polygon = JSON.parse('{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[6.26950853,50.72473626],[6.26953794,50.72468996],[6.2695546,50.7246512],[6.26949169,50.72468741],[6.26948194,50.72469389],[6.26946154,50.72470787],[6.26949172,50.72474162],[6.26950853,50.72473626]]]}}');

and this bounding box:

const bbox = JSON.parse('{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[6.511887823915231,50.950514414615334],[6.512896634823051,50.53594214902105],[5.98503728350704,50.53594214902105],[5.98604609441486,50.950514414615334],[6.511887823915231,50.950514414615334]]]}}');

I want to know if the polygon is intesecting the bounding box

I use booleanOverlap

turf.booleanOverlap(polygon, bbox);

It returns false.

Why is that? That definetly is within the bounding box. As far as I understand it should return true?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
rowanwinscommented, Mar 27, 2018

booleanIntersects does now also exists, it’s only a recent addition and hasn’t made it’s way into the docs, but it is available via npm, that said it just returns the opposite of booleanDisjoint.

1reaction
andrewharveycommented, Dec 29, 2018

I just ran into this issue, I was thinking that booleanOverlap was an intersection, I can see here it’s not. I think that once booleanIntersects makes it to the docs, this would clear up the issue as most people looking for intersects would use it rather than falsly trying to use overlap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intersect (Boolean) — Blender Manual
Performs Boolean operations with the selection on the unselected geometry. ... however, this solver lacks support for overlapping geometry. Merge Threshold.
Read more >
Boolean Operations - Sketch
In the Mac app, there are four boolean operations you can use to combine and create complex shapes. Select two or more shapes,...
Read more >
Advanced geospatial analysis - Turf.js
Boolean -Crosses returns True if the intersection results in a geometry whose dimension is one less than the maximum dimension of the two...
Read more >
Booleans - Foundry Learn
Meshes must not have coincidental overlapping (non-manifold) geometry. This means no vertices, edges, or faces that share the same position in space.
Read more >
Canu Parameter Reference — canu 2.2 documentation
saveOverlaps <boolean=false>: If 'true', retain all overlap stores. · purgeOverlaps <string=normal>. Controls when to remove intermediate overlap results.
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