turf_dart icon indicating copy to clipboard operation
turf_dart copied to clipboard

lineIntersect on Polygon has unexpected result

Open jsiedentop opened this issue 1 year ago • 1 comments

lineIntersect on polygons leads to unexpected result. In TurfJs we get all 3 points of the polygon, in TurfDart we only get one Point.

  • playground
  • input data
  • TurfJs result
  • TurfDart result
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -53.57208251953125,
              28.287451910503744
            ],
            [
              -53.33038330078125,
              28.29228897739706
            ],
            [
              -53.34136962890625,
              28.430052892335723
            ],
            [
              -53.57208251953125,
              28.287451910503744
            ]
          ]
        ]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -53.57208251953125,
              28.287451910503744
            ],
            [
              -53.34136962890625,
              28.430052892335723
            ],
            [
              -53.33038330078125,
              28.29228897739706
            ],
            [
              -53.57208251953125,
              28.287451910503744
            ]
          ]
        ]
      }
    }
  ]
}

jsiedentop avatar Feb 27 '24 11:02 jsiedentop

could be related to #150

jsiedentop avatar Mar 01 '24 00:03 jsiedentop