Skip to content

boolean-valid - Allow MultiLineStrings with only a single LineString#2846

Merged
mfedderly merged 3 commits into
Turfjs:masterfrom
sharmaB01:multiline-issue-#2837
Jul 18, 2026
Merged

boolean-valid - Allow MultiLineStrings with only a single LineString#2846
mfedderly merged 3 commits into
Turfjs:masterfrom
sharmaB01:multiline-issue-#2837

Conversation

@sharmaB01

@sharmaB01 sharmaB01 commented Feb 24, 2025

Copy link
Copy Markdown
Contributor

Fixes #2837

Why does @turf/boolean-valid require MultiLineStrings to have at least two component LineStrings? #2837

because multiline will be like

{
  "type": "MultiLineString",
  "coordinates": [
    [
      [100.0, 0.0],
      [101.0, 1.0],
      [102.0, 2.0]
    ]
  ]
}

@mfedderly mfedderly changed the title fix issue #2837 boolean-valid - Allow MultiLineStrings with only a single LineString Jul 18, 2026

@mfedderly mfedderly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some more digging and I think we need to expect 1 or more LineStrings.

If I had to guess the 2 probably came from a copy/paste error from a Position coordinates check (for a [lng, lat] pair).

Thank you!

@mfedderly mfedderly added this to the v7.4 milestone Jul 18, 2026
@mfedderly
mfedderly merged commit f5d812d into Turfjs:master Jul 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@turf/boolean-valid requires MultiLineStrings to have at least two component LineStrings

2 participants