Skip to content

Difference between polygons results in "Unable to complete output ring starting at ..." #2277

@val-o

Description

@val-o

Version: 6.5.0

turf.difference crushes with

turf.min.js:88 Uncaught Error: Unable to complete output ring starting at [54.56795530519258, 24.44447467409078]. Last matching segment found ends at [54.57080496898934, 24.4416737163564].

Input polygons
  
{
    "type": "Feature",
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [
                    54.56658645236534,
                    24.445194105819738
                ],
                [
                    54.56658654953498,
                    24.441605817571325
                ],
                [
                    54.57000000000001,
                    24.43981171174874
                ],
                [
                    54.57341345046501,
                    24.441605817571325
                ],
                [
                    54.573413547634665,
                    24.445194105819738
                ],
                [
                    54.57000000000001,
                    24.44698828825126
                ],
                [
                    54.56658645236534,
                    24.445194105819738
                ]
            ],
            [
                [
                    54.56795530519258,
                    24.44447467409078
                ],
                [
                    54.57000000000001,
                    24.4455493756693
                ],
                [
                    54.57204469480743,
                    24.44447467409078
                ],
                [
                    54.57204465994316,
                    24.442325298422087
                ],
                [
                    54.57000000000001,
                    24.441250624330703
                ],
                [
                    54.56795534005685,
                    24.442325298422087
                ],
                [
                    54.56795530519258,
                    24.44447467409078
                ]
            ]
        ]
    }
}
{
    "type": "Feature",
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [
                    54.569778932416476,
                    24.441366817541834
                ],
                [
                    54.56977894449294,
                    24.441074136738756
                ],
                [
                    54.57000000000001,
                    24.441190327160086
                ],
                [
                    54.57084694057397,
                    24.440745161222193
                ],
                [
                    54.57084693745136,
                    24.44028034081218
                ],
                [
                    54.571147760242575,
                    24.44043845608456
                ],
                [
                    54.57114771720956,
                    24.441853864959285
                ],
                [
                    54.57080496898934,
                    24.4416737163564
                ],
                [
                    54.57080502276297,
                    24.441026402022757
                ],
                [
                    54.57074511559248,
                    24.441057889217532
                ],
                [
                    54.57074509421786,
                    24.441642246152345
                ],
                [
                    54.57000000000001,
                    24.441250624330703
                ],
                [
                    54.569778932416476,
                    24.441366817541834
                ]
            ]
        ]
    }
}

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions