geo-area
v1.0.0
Published
calculate polygon area by geo coordinates
Downloads
1,898
Readme
geo-area
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
| option | desc | default | | ------------- |:--------------:| ------------| | x | property key x | 'longitude' | | y | property key y | 'latitude' |