Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 27 18:29
    VadimCiv edited #2341
  • Sep 27 18:20
    VadimCiv edited #2341
  • Sep 27 18:10
    VadimCiv edited #2341
  • Sep 27 18:10
    VadimCiv edited #2341
  • Sep 27 18:09
    VadimCiv edited #2341
  • Sep 27 18:08
    VadimCiv edited #2341
  • Sep 27 18:07
    VadimCiv opened #2341
  • Sep 26 15:58
    just-Bri commented #2260
  • Sep 26 00:49
    stevage opened #2340
  • Sep 23 17:13
    just-Bri commented #2157
  • Sep 21 08:27
    linzhongxian commented #2318
  • Sep 20 15:47
    twelch locked #2336
  • Sep 20 15:47
    twelch closed #2336
  • Sep 20 11:45
    Debakel opened #2338
  • Sep 20 09:50
    Debakel opened #2337
  • Sep 20 09:43
    CrommVardek opened #2336
  • Sep 18 19:53
    jasonhibbs commented #2301
  • Sep 18 19:50
    twelch commented #2301
  • Sep 18 19:39
    jasonhibbs commented #2301
  • Sep 18 19:38
    jasonhibbs commented #2301
Morgan Herlocker
@morganherlocker
@giulioungaretti most of the processing I do is with large datasets. Turf does well provided you think about optimizations where necessary. For example, indexing data is going to have a dramatic increase in algorithm performance, just like it would in PostGIS or other GIS engines.
Morgan Herlocker
@morganherlocker
@giulioungaretti also, forgot to mention that you can also test the performance of any turf module. clone the module repo and run node bench.js to see the number of operations per second for any function. https://dl.dropbox.com/s/16v5j5y5dpubzyv/Screenshot%202015-05-05%2012.09.55.png?dl=0
Scott Chamberlain
@sckott
I'm working on an R client for turf.js https://github.com/ropensci/lawn http://cran.rstudio.com/web/packages/lawn/ - Is there a place in turf docs to list this so others know its available?
Giulio Ungaretti
@giulioungaretti
@morganherlocker thanks a bunch!
James Seppi
@jseppi
Hey @morganherlocker and @tmcw - I'm going to give a short intro to Turf talk at a small conference this Friday. Do you guys mind if I pull stuff from previous presentations you've given (with credit, of course)?
stollc
@stollc
Is isobands removed from turf? I get an "turf.isobands is not a function" error. But it works if i use v1.3
Tim Channell
@tcql
@stollc yea, it got removed awhile back. I think it just wasn't doing what it was intended to do. AFAIK the plan is to fix it up and bring it back at some point
stollc
@stollc
@tchannel too bad :) i got the v1.3 to work , but with 20k points it took too long. I guess i need to do it server side.
Tim Wisniewski
@timwis
Hey guys, I have a bunch of points (available from the api as JSON or GeoJSON) and I'd like to gradient a polygon map based on how many points reside in each polygon, similar to what happens here: https://data.phila.gov/view/hc2b-xbvz -- would turf be able to help with that?
Paul
@paulJordaan
Hey guys, I have a map where I subtract existing polygons from a newly drawn polygon using turfjs. The result polygon seems to have the wrong projection. I have explained the issue here http://stackoverflow.com/questions/32192699/turf-js-erase-produces-polygon-with-wrong-projection. Any help would be much appreciated!
James Seppi
@jseppi
@timwis - I think you could use turf-count (https://github.com/Turfjs/turf-count) to assign a count of points in each polygon, and then something like @morganherlocker's geocolor (https://github.com/morganherlocker/geocolor) to assist with the coloring
Tim Wisniewski
@timwis
Thanks!
mrmanhluc
@mrmanhluc
why can't I use function turf.union(polygon1, polygon2)in IE9
Per Liedman
@perliedman
@mrmanhluc can't say I know, but what error are you seeing?
mrmanhluc
@mrmanhluc
@perliedman The map just doesn't load at all, just a blank page. It's like turf isn't compatible with IE9, can you give me a working example of turf in IE9 ? Or the required browser list for turf
This message was deleted
Per Liedman
@perliedman
@mrmanhluc what if you check IE's debugger? It's infuriating to work with, but should at least give you an error message.
@mrmanhluc no idea about turf's browser compatibility, but just guessing, I don't think IE9 compatibility is a top priority, but at the same time I'd be surprised if not most things would work.
Stepan Kuzmin
@stepankuzmin
Hey guys! I've recently wrote a simple turf module that wraps the world around 180 meridian. It's analogue of PostGIS ST_Shift_Longitude. Maybe it can be included in turf. See https://github.com/stepankuzmin/turf-shift-longitude
arkhemlol
@arkhemlol
This message was deleted
Stepan Kuzmin
@stepankuzmin
Hey guys! Is there any way to create clusters from points using Turf?
Mike Atlas
@mikeatlas
This message was deleted
https://github.com/Leaflet/Leaflet.markercluster is the #1 leaflet plugin i think they could borrow/implement the concept https://github.com/Leaflet/Leaflet.markercluster/blob/master/src/DistanceGrid.js @StepanKuzmin
Tom MacWright
@tmcw
@morganherlocker is there a proj4js library wrapper that does geojson?
Per Liedman
@perliedman
@tmcw depending on what you mean by wrapper, this might be what you want: https://github.com/perliedman/reproject
@tmcw Calvin Metcalf has also written something similar: https://github.com/calvinmetcalf/proj4geojson
Tom MacWright
@tmcw
@perliedman great, reproject looks like it
Erinç Fırtına
@EricMcRay
Robert Laverty
@roblav96
im really bumbed i dont see much turf activity :/ i check this gitter everyday hoping for some activity
Nabil Servais
@blackrez
Hello, I have made a module similar as ST_IsValid function of postgis : https://github.com/blackrez/turf-isvalid. How I can add it in turf?
Stepan Kuzmin
@stepankuzmin
Hi @blackrez! I’ve also made turf module and want to add it in turf (https://github.com/stepankuzmin/turf-shift-longitude). Can you ping me, if you find out how to do it?
Maybe we can make PR to https://github.com/Turfjs/turf
Or transfer repo’s ownership to Turfjs organization on GitHub
Robert Laverty
@roblav96
@stepankuzmin great module man!
Stepan Kuzmin
@stepankuzmin
Thanks @roblav96. It’s pretty simple, though
Robert Laverty
@roblav96
does anyone know how to go about simplifying a feature collection of points? i have a point on a line every meter for 1000 meters or so. i want to simplify it to about 250 points or so. i tried using turf.simplify but it didnt like my feature collection:
var fc = turf.featurecollection( features )
console.log( 'fc >', fc )

if ( fc.features.length > 0 ) {
    var simplified = turf.simplify( fc, 0.01, false )
    console.log( 'simplified >', simplified )
}
Uncaught TypeError: Cannot read property 'type' of undefined
Robert Laverty
@roblav96
does anyone know how to produce a 16 verticy polygon from a circle? so I provide one point and the radius and i need to return a polygon from that. possible?
and it turns out you cant simplify a feature collection of points :X
Tom MacWright
@tmcw
@roblav96 at a low level, i'd do it by using https://github.com/mapbox/spherical, with each angle differing by 360/16 degrees, and then using all of the points as coordinates in the coordinate array of a geojson polygon
Robert Laverty
@roblav96
@tmcw well it turns out my rethinkdb driver has this out of the box :D
Tom MacWright
@tmcw
cool!
Nikhil Murarka
@Nikhil14
hi any plan on added network analysis/topology checks to turf ? like if we want to find conflicting one ways in current extent ?
Taylor Mansfield
@lavahot
Hi guys, I need some help converting mapbox vector tiles to GeoJSON in the browser so I can run turf operations on that layer. Any ideas? I know there are some Node libraries out there that can do this, but I really need to do it in the browser.
Robert Laverty
@roblav96
@lavahot i dont quite understand what youre asking, i use turf with mapbox-gl-js in the browser no problem
Taylor Mansfield
@lavahot
@roblav96 I'm using leaflet, not mapbox directly.
turf only takes GeoJSON arguments, not vector tiles, so I need some way to convert the data in that layer to GeoJSON just to use it with turf.
Erinç Fırtına
@EricMcRay
@lavahot as I know, leaflet has toGeoJson method for that.
Taylor Mansfield
@lavahot
@EricMcRay leaflet does not natively read MVTs. I had to use a plugin for it, which AFAIK does not have a toGeoJson method.