Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
TURF booleanwithin is not working as expected

im currently trying to validate that a polygon is completely within another polygon. But there is a use case for more complicated polygons where it should return false but turf understand it as a valid one.

Here is the sandbox.

https://codesandbox.io/embed/adoring-lamarr-6mi8wv?fontsize=14&hidenavigation=1&theme=dark

And here are the polygons. https://gist.github.com/tomascenteno42/107c19531ebbcf8f8106c27282bf3891

Thanks (:

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The problem is that, currently, booleanWithin only handles a very limited case of testing convex polygons. That's because it only checks if the vertices of the 1st polygon are within the 2nd polygon.

This might not be get fixed before v7.

For now you might consider to use de9im library.

It's from turf's issue page.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!