turf-concave

WebJar for turf-concave

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

turf-concave
Last Version

Last Version

3.0.12
Release Date

Release Date

Type

Type

jar
Description

Description

turf-concave
WebJar for turf-concave
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/turf-junkyard/turf-concave

Download turf-concave

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/turf-concave/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>turf-concave</artifactId>
    <version>3.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/turf-concave/
implementation 'org.webjars.npm:turf-concave:3.0.12'
// https://jarcasting.com/artifacts/org.webjars.npm/turf-concave/
implementation ("org.webjars.npm:turf-concave:3.0.12")
'org.webjars.npm:turf-concave:jar:3.0.12'
<dependency org="org.webjars.npm" name="turf-concave" rev="3.0.12">
  <artifact name="turf-concave" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='turf-concave', version='3.0.12')
)
libraryDependencies += "org.webjars.npm" % "turf-concave" % "3.0.12"
[org.webjars.npm/turf-concave "3.0.12"]

Dependencies

compile (4)

Group / Artifact Type Version
org.webjars.npm : turf-meta jar [3.0.12,4)
org.webjars.npm : turf-tin jar [3.0.12,4)
org.webjars.npm : turf-union jar [3.0.12,4)
org.webjars.npm : turf-distance jar [3.0.12,4)

Project Modules

There are no modules declared in this project.

turf-concave

build status

turf concave module

turf.concave(points, maxEdge, units)

Takes a set of Point|points and returns a concave hull polygon.

Internally, this uses turf-tin to generate geometries.

Parameters

parameter type description
points FeatureCollection.<Point> input points
maxEdge Number the size of an edge necessary for part of the hull to become concave (in miles)
units String used for maxEdge distance (miles or kilometers)

Example

var points = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-63.601226, 44.642643]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-63.591442, 44.651436]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-63.580799, 44.648749]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-63.573589, 44.641788]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-63.587665, 44.64533]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-63.595218, 44.64765]
      }
    }
  ]
};

var hull = turf.concave(points, 1, 'miles');

var resultFeatures = points.features.concat(hull);
var result = {
  "type": "FeatureCollection",
  "features": resultFeatures
};

//=result

Returns Feature.<Polygon>, a concave hull

Installation

Requires nodejs.

$ npm install turf-concave

Tests

$ npm test
org.webjars.npm

deprecated turf modules: do not use or reference, for redirects only

turf is now a monorepo: all turf modules are in Turfjs/turf

Versions

Version
3.0.12