Turfjs / turf-www

turf website
http://turfjs.org/
MIT License
28 stars 28 forks source link

Add @turf/line-intersect to docs #101

Closed rowanwins closed 7 years ago

rowanwins commented 7 years ago

Add the @turf/line-intersect to docs See https://github.com/Turfjs/turf/issues/586

DenisCarriere commented 7 years ago

👍 I always forget adding the new modules to the docs

rowanwins commented 7 years ago

Just looking at the jsdocs for this @DenisCarriere - the module is called lineIntersect but it accepts lines or polygons. We already have the the intersect module which does polys. Just trying to work out if we need to rationalise them or change the name of lineIntersect?

DenisCarriere commented 7 years ago
  1. Well Polygons are also a collection of lines (I just made it easier to deflate polygons into lines).
  2. @turf/intersect has jsts and should be entirely removed (Turf 4.0 should not have any jsts)
  3. @turf/line-intersect returns a Feature<Point> where @turf/intersect returns RANDOM.

It's hard to only have one function with the name intersect when it could mean a thousand different things.

We REALLY need to include Before & After maps for these modules, it's very hard to visual them from only Javascript examples or source code.

Ideally we also need a module that intersect returns true/false (very rapidly) mentioned here https://github.com/Turfjs/turf/issues/203.

rowanwins commented 7 years ago

yeah ok, so I'll update the docs with what we've got at the moment and as you say hopefully introducing the examples will help again.

DenisCarriere commented 7 years ago

👍 Added to www