turf icon indicating copy to clipboard operation
turf copied to clipboard

line self-intersect after bezier

Open jingsam opened this issue 6 years ago • 7 comments

turf 4.7.3

Before: 1

Afer: 2

jingsam avatar Oct 17 '17 01:10 jingsam

@jingsam could you please provide some more details on the issue? Could you please provide some data and a code snippet that replicate the issue so we can take test it?

  • [ ] GeoJSON data as a gist file or geojson.io (filename extension must be .geojson).
  • [ ] Snippet of source code or for complex examples use jsfiddle.

stebogit avatar Oct 17 '17 06:10 stebogit

Closing due to inactivity and lack of info

rowanwins avatar Feb 16 '18 04:02 rowanwins

I have the same issue, here is an example: before : http://geojson.io/#id=gist:mmomtchev/eb8c16374613397f3a0d6323cfb594b0&map=6/49.246/-1.923 after : http://geojson.io/#id=gist:mmomtchev/9d1f6a1138b4c96ebe37ee83cb8a96f7&map=6/48.320/2.010

this is with bezierSpline with 10000, 0.85

I was able to greatly reduce the frequency of it appearing by segmentizing the lines and then simplifying them before applying bezier

mmomtchev avatar May 19 '18 19:05 mmomtchev

This is a problem that still exists for version [email protected] Test: https://jsfiddle.net/devfzm/12zbspqk/2/

image

ifzm avatar Oct 09 '19 03:10 ifzm

image Line intersects automatically after MultiLineString is offset by lineOffset

{
        type: 'FeatureCollection',
        features: [turf.lineOffset(mapData, 300, {
          units: 'meters',
        })]
}

Soya-xy avatar Jun 17 '22 06:06 Soya-xy

How can I share GeoJSON?

Soya-xy avatar Jun 17 '22 06:06 Soya-xy

You can share GeoJSON like you share JSON in GitHub comments; using three backticks and then writing json, pasting your formatted GeoJSON, then closing with three backticks again:

Screenshot_20220620-204247__01.jpg

It renders like this:

{
    "type": "Feature",
    "properties": {
        "name": "Coors Field",
        "amenity": "Baseball Stadium",
        "popupContent": "This is where the Rockies play!"
    },
    "geometry": {
        "type": "Point",
        "coordinates": [-104.99404, 39.75621]
    }
}

JamesLMilner avatar Jun 20 '22 17:06 JamesLMilner