booleanCrosses returns false although two polygones crosses each other

Open
#1,864 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by extracting TwoPolygons.zip and reproducing the reported result with booleanCrosses, comparing the MultiPolygon case with the single Polygon case. Trace the booleanCrosses entry point and inspect how the two geometry types are handled. Done means the supplied geometries return true consistently with the reported QGIS result.

Written by the indexing model from the issue text.

Description

@turf/boolean-crosses bug

Hello, sorry but geojson.io is not working at the moment for me so I cannot give a link..

TwoPolygons.zip

I have 2 polygons, one of them is a multipolygon that contain a single polygon.
The booleanCrosses returns false when it should return true.
Converting the multipolygon to a single polygon and then calling the function returns the desired result.
I also checked this with QGIS.

Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Turfjs/turf

All issues in Turfjs/turf

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.