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
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.
Richard Astbury
@richorama
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
blob
so my buffer looks like this ^
with 3 coords, rather than 4
Per Liedman
@perliedman
@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
@richorama
ah ha!
thanks