Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 27 14:34
    ineeve commented #1211
  • Oct 26 08:46
    JamesLMilner commented #1788
  • Oct 26 08:32

    JamesLMilner on master

    Use @turf/jsts, reduce bundle s… (compare)

  • Oct 26 08:32
    JamesLMilner closed #2217
  • Oct 25 22:55
    JamesLMilner synchronize #2217
  • Oct 25 16:44
    stephkoltun commented #1788
  • Oct 25 06:11
    twelch edited #2155
  • Oct 25 06:10
    twelch edited #2155
  • Oct 25 06:10
    twelch edited #2155
  • Oct 25 06:10
    twelch edited #2155
  • Oct 25 06:10
    twelch edited #2155
  • Oct 25 06:08
    twelch commented #1658
  • Oct 25 06:07

    twelch on geojson-type-switch2

    (compare)

  • Oct 25 06:07

    twelch on master

    Migrate to @types/geojson packa… (compare)

  • Oct 25 06:07
    twelch closed #2158
  • Oct 25 06:07
    twelch closed #1658
  • Oct 23 23:31
    twelch edited #2158
  • Oct 23 23:30
    twelch edited #2158
  • Oct 23 23:23
    twelch edited #2158
  • Oct 23 23:11
    twelch commented #2158
Morgan Herlocker
@morganherlocker
Hey @Gcuencam! I would recommend requesting a route for your waypoints from the Mapbox Directions API, using the geojson flag, for simplicity (default is polyline encoding). https://www.mapbox.com/api-documentation/#retrieve-directions
then run the result against turf.length, which measures the distance of a linestring
Morgan Herlocker
@morganherlocker
@tylkomat bit late to your question, but you can combine turf.bboxPolygon and turf.transformRotate to achieve this
Matthias Tylkowski
@tylkomat
@morganherlocker No worries and thank you. In the meantime I came to the same solution.
Ghost
@ghost~5ad5fcf2d73408ce4f95fd15
hey! just a small question - can turfjs be used to work with files in the 200M rows scale ?
i've done some work where I take location data, create hexbins and calculate how many points are in a bin
I worry I might run into buffer errors
so i was just wondering, should I use turfjs for this scale of data or look for something else ?
ohenepee
@ohenepee
Hello... is there anyway to get the cardinal corners of a bbox, like northeast, northwest, southeast, southwest?
David Haynes
@dahaynes
Hello, Has anyone tried to use Turfjs with MongoDB? I'm looking for a bit of assistance in performing centroid queries on a collection of boundaries
Pochivalin Alexey
@pochivalin-alexey
Hello, can you help me? How update feature coordinates using turf.coordReduce? What is the difference turf.coordReduce and turf.coordEach?
Pochivalin Alexey
@pochivalin-alexey
@ohenepee may be extract vertexes from bbox and use turf.bearing . . .
RISHAV ROY
@rishavroy1264bitmesra
How to project a point over linestring using turf ?
Morgan Herlocker
@morganherlocker
turf.along will give you a point N distance along a linestring
Dan Ford
@danford1
Hey all, I have a vector tile polygon source hosted in Mapbox Studio and an isochrone geojson generated using the isochrone api. I'm trying to use turf intersect to find a count of polygons within the isochrone, but getting Unknown GeoJSON type: undefined because one of the data inputs is vector tiles. I found a question on this back in 2016, but looking for a current answer/resource that will help me learn a) whether I need to convert the vt to geojson and b) best method for doing this client side. Maybe the best answer is to just use a geojson source to begin with?
Pochivalin Alexey
@pochivalin-alexey
@danford1 Attention, turf intesect using only two polygon. Simple way to convert vt geometry to geojson format use turf.polygon method.
Dan Ford
@danford1
OK, thanks! I just realized that I have to iterate over each polygon in the feature class and run a separate intersect. Does anyone have an example of this they can share with me?
Pochivalin Alexey
@pochivalin-alexey
@danford1 What example are you interested in?
Dan Ford
@danford1
How to run an intersect between Poly1 and a feature class with many polygons.
Ilya Radchenko
@knownasilya
Is there a way to do an intersect and also handle donut holes?
Has anyone done something like this?
Pochivalin Alexey
@pochivalin-alexey
@knownasilya By geojson spec polygon without hole like this:
{ "type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
]
}
and with hole:
{ "type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
]
}
Attention: first array is bigest area
Check this two condition and do intersect.
Ilya Radchenko
@knownasilya
Thanks @pochivalin-alexey
Ben Boughton
@benboughton1
Hi can anyone help as to why this dissolve example is not dissolving? http://jsfiddle.net/dejz01v4/1/
Ben Boughton
@benboughton1
I put the question on StackExchange if anyone would like to answer there - thanks!
Ario K
@itsario_twitter
hello
i'm wondering if there is a library like this https://www.npmjs.com/package/@turf/boolean-point-in-polygon
that instead of returning a boolean it returns the matching polygon
Pochivalin Alexey
@pochivalin-alexey
Hi, you may iterate your data, check boolean-point-in-polygon and returns polygon manualy. There is points-within-polygon, it returns points. May be start it and iterate your polygons or point...
@benboughton1 Very strange, in source code dissolve using union . . .
pandabuilt
@pandabuilt
I'm soooo confused by versioning - Is v7 the latest? this still seems to be an issue: Turfjs/turf#1800
Ario K
@itsario_twitter
Hello, I'm using the turf buffer function to create a 40 mile bbox from a midpoint, when I calculate the bbox diagonal I get ~44 but when I do the math it should be atleast this: Math.pow(2 * Math.pow(40, 2), 1 / 2 ) = 56.56
Ario K
@itsario_twitter
pandabuilt
@pandabuilt
: Unable to complete output ring starting at [-87.39118681312462, 37.98270758923267]. Last matching segment found ends at [-87.39118681312462, 37.982707589232696].
Anyone experience this?
Nikola Pavlovic
@raegen
yo, would someone be so kind to explain to me what http://turfjs.org/docs/#buffer actually is?
from the docs, it seems to be something that's obvious and widely known
Morgan Herlocker
@morganherlocker
This definition is listed in a few places, and I think it is a good (reasonably precise) description:
"A buffer is an area defined by the bounding region determined by a set of points at a specified maximum distance from all nodes along segments of an object."
In practice, its a polygonal boundary drawn around a geometry of any type, with all edges at least N distance from the unbuffered geometry
PostGIS has a similar feature that has more documentation here: http://www.postgis.org/docs/ST_Buffer.html
Nikola Pavlovic
@raegen
@morganherlocker a very sincere thanks
xlcrr
@xlcrr
Anyone looking to help an open source project ? For the last few years, I have been empowering people to map litter. https://github.com/OpenLitterMap/openlittermap-web is now open source
Nic Hill
@nrhill1
Hey guys, trying to use the simplify function from turf.js in a react app but it returns an error when compiling---Unknown GeoJSON type
I am working on a wildfire tracking app and trying to get rid of ugly sliced, self intersecting polygons. Check it out here: firewild.netlify.app
Nic Hill
@nrhill1
Trying to modify Firemap.js in a way that doesn't end up like that
sachin-narang
@sachin-narang
I have a basic doubt as am using the turf library for the first time. I have downloaded turf.min.js and included through <script> tag but the web-console shows the error "turf is not defined".
sachin-narang
@sachin-narang
Also, getting a error message for line number 1 at turf.min.js Uncaught Syntax Error