turf-area

WebJar for turf-area

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

turf-area
Last Version

Last Version

3.0.12
Release Date

Release Date

Type

Type

jar
Description

Description

turf-area
WebJar for turf-area
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

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

Download turf-area

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : geojson-area jar [0.2.1,0.3)

Project Modules

There are no modules declared in this project.

turf-area

build status

calculate the area of a polygon or multipolygon feature

turf.area(input)

Takes a one or more features and returns their area in square meters.

Parameters

parameter type description
input Feature,FeatureCollection input features

Example

var polygons = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [-67.031021, 10.458102],
          [-67.031021, 10.53372],
          [-66.929397, 10.53372],
          [-66.929397, 10.458102],
          [-67.031021, 10.458102]
        ]]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [-66.919784, 10.397325],
          [-66.919784, 10.513467],
          [-66.805114, 10.513467],
          [-66.805114, 10.397325],
          [-66.919784, 10.397325]
        ]]
      }
    }
  ]
};

var area = turf.area(polygons);

//=area

Returns Number, area in square meters

Installation

Requires nodejs.

$ npm install turf-area

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