Skip to content

lineSlice returns line with duplicate coordinates #2946

@mn-prp

Description

@mn-prp

Using the following arguments, you get the result specified, which contains a duplicate coordinate. In turn, if you call lineSlice again with the result, it throws an error like that reported in #2939 and related issues.

{
        startPt: {
          type: 'Feature',
          properties: {},
          geometry: { type: 'Point', coordinates: [1.9999999999999998, 0] }
        },
        endPt: {
          type: 'Feature',
          properties: {},
          geometry: { type: 'Point', coordinates: [1.9999999999999991, 2] }
        },
        line: {
          type: 'Feature',
          properties: {},
          geometry: {
            type: 'LineString',
            coordinates: [
              [2.9998475636392152, 0.00015236670332290198],
              [2, -1],
              [1.9999999999999991, 2]
            ]
          }
        },
        result: {
          type: 'Feature',
          properties: {},
          geometry: {
            type: 'LineString',
            coordinates: [
              [1.9999999999999998, 6.294812763123119e-32],
              [1.9999999999999991, 2],
              [1.9999999999999991, 2]
            ]
          }
        }
      }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions