Suggestion: @turf/boolean-covers #2790
Replies: 2 comments
-
Hi @rdmurphy Thanks for the suggestion. I've slowly been adding more of the boolean style modules so I'll add Cheers |
Beta Was this translation helpful? Give feedback.
-
@rowanwins @stebogit I recently published de9im a Javascript library that Turf might find helpful. It implements all of the DE-9IM spatial predicates and I believe addresses many of the issues in the various I'd be willing to work on collaborating to integrate it in Turf if there is any interest. It's been a while since I contributed to Turf. After looking at the issue tracker it looks like it is probably best to wait until v7 is released. |
Beta Was this translation helpful? Give feedback.
-
Hello! Not sure what the best way to approach making a suggestion is, so I'll lay it out here.
Today I was trying to figure out if there was a way to do something like
ST_Covers
using Turf. After unsuccessfully attempting to get the desired result using each of the boolean* methods, I finally figured out a way to get what I wanted by combining a few pieces of what Turf currently provides.When I attempted to use only
booleanOverlap
, I wouldn't get any features entirely within my collection A. When I attempted to use onlybooleanContains
, I wouldn't get any features that only touched collection A. With cover, you want both.Of course, I could just keep doing what I have here and happily keep getting work done. 😄 But this does kind of feel like something that could be in Turf proper!
(There's also the inverse of
ST_Cover
—ST_CoveredBy
. Much likebooleanWithin
andbooleanContains
, these two could exist as a pair.)Beta Was this translation helpful? Give feedback.
All reactions