From b753f169ba0f56e4a04ae1e224bb8f44222d01d5 Mon Sep 17 00:00:00 2001 From: stebogit Date: Thu, 17 Aug 2017 01:06:56 -0700 Subject: [PATCH 01/12] additional refactoring of turf-concave: - replaced turf-union with geojson-dissolve; - updated and added tests; - updated bench and readme; --- packages/turf-concave/README.md | 2 +- packages/turf-concave/bench.js | 16 +- packages/turf-concave/index.js | 55 ++-- packages/turf-concave/package.json | 16 +- packages/turf-concave/test.js | 7 +- packages/turf-concave/test/in/fiji.geojson | 152 ++++++++++++ packages/turf-concave/test/in/pts3.geojson | 86 +++++++ packages/turf-concave/test/out/fiji.geojson | 234 ++++++++++++++++++ .../turf-concave/test/out/issue-333.geojson | 92 +++---- packages/turf-concave/test/out/pts1.geojson | 16 +- packages/turf-concave/test/out/pts2.geojson | 30 +-- packages/turf-concave/test/out/pts3.geojson | 130 ++++++++++ packages/turf-concave/yarn.lock | 84 +++++-- 13 files changed, 788 insertions(+), 132 deletions(-) create mode 100644 packages/turf-concave/test/in/fiji.geojson create mode 100644 packages/turf-concave/test/in/pts3.geojson create mode 100644 packages/turf-concave/test/out/fiji.geojson create mode 100644 packages/turf-concave/test/out/pts3.geojson diff --git a/packages/turf-concave/README.md b/packages/turf-concave/README.md index 4ead6bf9f0..802bb1deb4 100644 --- a/packages/turf-concave/README.md +++ b/packages/turf-concave/README.md @@ -31,7 +31,7 @@ var addToMap = [points, hull] - Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** if maxEdge parameter is missing or unable to compute hull -Returns **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Polygon](http://geojson.org/geojson-spec.html#polygon)>** a concave hull +Returns **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Polygon](http://geojson.org/geojson-spec.html#polygon)|[MultiPolygon](http://geojson.org/geojson-spec.html#multipolygon)>** a concave hull