# geoarea

> Calculates area of geo polygon in WGS84 coordinates

Latest version **0.0.1** (published 2015-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install geoarea
pnpm add geoarea
yarn add geoarea
bun add geoarea
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-12-08 |
| First published | 2015-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Anton Sadovnikoff |
| Maintainers | siddthartha |
| Keywords | wgs, 84, polygon, area, coordinates |

## Links

- npm: https://www.npmjs.com/package/geoarea
- Repository: https://github.com/siddthartha/geo-area-calculator
- Issues: https://github.com/siddthartha/geo-area-calculator/issues
- npm.io page: https://npm.io/package/geoarea

## Dependencies (1)

- [qunit](https://npm.io/package/qunit.md) ^0.7.7

## Recent versions

- 0.0.1 (latest) — 2015-12-08

## README

# geo-area-calculator

Вычисление площади полигона в координатах WGS'84. Порт Python-алгоритма на PHP и JS.
Статья источник: http://gis-lab.info/qa/polygon-area-sphere-ellipsoid.html

# Установка
В корне модуля:
```sh
.../geo-area-calculator$ composer install
```
Если необходимы js-тесты:
```sh
.../geo-area-calculator$ npm install
```
# Тесты
PHP
-----
```sh
.../geo-area-calculator$ phpunit
```

JavaScript
-----
```sh
.../geo-area-calculator$ npm test
```

# Примеры

JavaScript
-----
```js
alert( ffGeo.getGeoPolygonArea(
			[
				[ -10.812317, 18 ],
				[ 10.812317, -18 ],
				[ 26.565051,  18 ],
				[ 52.622632, -18 ],
				[ 52.622632,  54 ],
				[ 10.812317,  54 ],
				[ -10.812317, 18 ],
			]
) );
```

PHP
-----
```php
use siddthartha\geo\area\helpers\GeoAreaCalculator;

echo GeoAreaCalculator::getArea(
        [
                [ -10.812317, 18 ],
                [ 10.812317, -18 ],
                [ 26.565051,  18 ],
                [ 52.622632, -18 ],
                [ 52.622632,  54 ],
                [ 10.812317,  54 ],
                [ -10.812317, 18 ],
        ]
);
// 33953235824742.51 (sq.meters)
```

---
_Source: https://npm.io/package/geoarea · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
