Skip to content

LineOffset is crashing with two identical coordinates in sequence #1946

@SelaO

Description

@SelaO

I'm getting the error:

catch, Error: coordinates must contain numbers

when there are two or more identical coordinates in sequence:

          const arr1 = [[1,1], [1,1]]
          const x = lineString(arr1)
          const y = lineOffset(x, 0.001)

but this works:

          const arr1 = [[1,1],[12,12], [1,1]]
          const x = lineString(arr1)
          const y = lineOffset(x, 0.001)

It isn't mentioned in the docs that it's not ok to have identical points...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions