1.0.0 • Published 7 years ago

geo-area v1.0.0

Weekly downloads
13
License
MIT
Repository
github
Last release
7 years ago

geo-area

npm version

convex hull 2D algorithm using monotone chain algorithm

usage

const geoarea = require('geo-area')(/*options*/{x: 'lng', y: 'lat'});

const polygon = [
  {
    lng: 121.409058,
    lat: 31.191149
  },
  ...
];

let area = geoarea(polygon);

Options

optiondescdefault
xproperty key x'longitude'
yproperty key y'latitude'