Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 30 10:19
    JamesLMilner commented #2307
  • Jun 30 10:14
    JamesLMilner labeled #2307
  • Jun 29 02:38
    amiller-gh edited #2307
  • Jun 29 02:20
    amiller-gh opened #2307
  • Jun 28 15:39
    stebogit closed #2306
  • Jun 28 15:39
    stebogit commented #2306
  • Jun 28 15:29
    stebogit labeled #2305
  • Jun 28 15:15
    pomm0 opened #2306
  • Jun 28 14:31
    plarner30 opened #2305
  • Jun 24 09:12

    JamesLMilner on master

    Set NearestPointOnLine type to … (compare)

  • Jun 24 09:12
    JamesLMilner closed #2296
  • Jun 24 09:12
    JamesLMilner closed #2285
  • Jun 23 14:50
    JamesLMilner synchronize #2296
  • Jun 23 13:44

    dependabot[bot] on master

    Bump shell-quote from 1.7.2 to … (compare)

  • Jun 23 13:44

    dependabot[bot] on npm_and_yarn


  • Jun 23 13:44
    dependabot[bot] closed #2304
  • Jun 23 13:44
    mfedderly commented #2304
  • Jun 23 02:19
    dependabot[bot] review_requested #2304
  • Jun 23 02:19
    dependabot[bot] labeled #2304
  • Jun 23 02:19
    dependabot[bot] opened #2304
Richard Astbury
Hi All. I'm having some trouble trying to get buffer to work.
when I attempt to create a buffer from this polygon, it seems to miss the last point off : https://gist.github.com/richorama/0dd4a2ce32d357279623
so my buffer looks like this ^
with 3 coords, rather than 4
Per Liedman
@richorama in GeoJSON, the last coordinate in a polygon's ring should be equal to the first
so you should duplicates the first coordinate to get correct results
Richard Astbury
ah ha!
Per Liedman
leaflet will let you get away with not duplicating it, however, so that's why it look correct anyway.
Giulio Ungaretti
hi. I created a Turf - node for node-red. It's my first project in this field and I just wanted to be sure if thats permitted.
Stefano Borghi
hello everybody, I have some issue to figure out how to create a contour map with turf, could anybody help?
Stefano Borghi
I can create isolines but how do I create actual polygons to be filled with color in a (google) map?
Lucien Knechtli
Hi, I'm trying to use turf.js with my application, but I'm getting an error when the code is evaluated: Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'
The referenced lines are lines 5625-5628 in the un-minified turf.js I got off github for v2.0.0
for reference / context, this is the function:
function orientation(n) { var pos = [] var neg = [] var m = matrix(n) var args = [] for(var i=0; i<n; ++i) { if((i&1)===0) { pos.push.apply(pos, determinant(cofactor(m, i))) } else { neg.push.apply(neg, determinant(cofactor(m, i))) } args.push("m" + i) } var posExpr = generateSum(pos) var negExpr = generateSum(neg) var funcName = "orientation" + n + "Exact" var code = ["function ", funcName, "(", args.join(), "){var p=", posExpr, ",n=", negExpr, ",d=sub(p,n);\ return d[d.length-1];};return ", funcName].join("") var proc = new Function("sum", "prod", "scale", "sub", code) return proc(robustSum, twoProduct, robustScale, robustSubtract) }
is there any way around this without modifying the CSP?
RYeah Sh
is there a showcase of turf?
Naveen Dandiprolu

Hi. I am trying to use the median / aggregate functions in my node application. I get an error : turf.aggregate is not a function. Looks like these functions are not installed through npm.. Is there a way around ?


Any ideas on looking for polygons in polygons? Both total enclosure and also partial. Points inside is easy enough, but keen to see if there are some clever ways of shapes in shapes.
Stefano Borghi
hello, I implemented a new version of contour module using marchingsquare.js and I thought it could be useful to somebody else
I created a PR some time ago (Turfjs/turf-isobands#7) on the turf-isobands moduel/package, but I haven;t received any feedback yet
is anybody going to resume the isobands module? in my understanding the module was set aside for it was not working properly
Peter Kupietz
Hi! I made a small helper to filter polygon rings. When you union simplified polygons you can filter out slivers from your resulting polygon. See https://github.com/kuuup/turf-filter-rings
David Das Kell
Hi all- does turf-intersect work for polygons with holes? Have a use case where everything works fine until a polygon with holes turns up!
Will idw work with evenly spaced points? The z value is the same for all polygons when i run it.
hi guys, how can I get turf hex grids to auto update without getting user to hover over each polygon
What's wrong with turf-ui-builder? I don't see point, featureCollection, etc.
Thomas Grice
any reason turf.intersect(poly1, poly1) would return undefined?
Because there is no intersection?
I wanted to ask if there is some simple way to construct a "sector"-like polygon given point, radius, bearing and angle. Right now I construct a circle (of given radius) and subtract from it two rectangles so that the sector is formed. Maybe there's an easier way like some built-in functionality, that I've overlooked?
Karine Hubner
Hello, i have a problem with buffer zone,
When she touches herself, she makes only one area instead of making a "hole" in the middle. Do you have a solution for it to overlap but it does not merge?
Peter Kupietz
@ArtCodeKarine I couldn't reproduce this problem with a simple donut.
Maybe you should open a ticket on github
Peter Kupietz
Hey, does anyone know if there's an ETA on the next version of Turf.js?

Hi, hoping for some help with insersect package. Getting the 'found non-noded intersection between LINESTRING' error. If you look at one of the polygons with issue, there is a dangling line that I think is causing.


I picked up latest to get this fix Turfjs/turf#1004. It fixes some of the issues but not all. Is there something I can do to detect and clean up the polygon?
seems like rounding issue inside intersect. can detect if run kink or truncated polygon. now just need to figure out hwo to remove
Does anyone know if there's any new replacement for this?
Or why was it deprecated?
moved into a boolean package
@AWulkan - in case you hadn't found it

@fugwenna I think I tried that without success.
I need to check if points and linestrings are within a polygon.

I ended up using this: http://turfjs.org/docs#booleanPointInPolygon
And a hack to make each end of a linestring become a point.
The draback is that I need to check thousands of points, one at a time, with a loop.