2017 © Pedro Peláez
 

library geo-area-fast

Geographical area of given polygon in WGS84

image

siddthartha/geo-area-fast

Geographical area of given polygon in WGS84

  • Wednesday, December 9, 2015
  • by siddthartha
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

geo-area-calculator-fast

Все аналогично geo-area-calculator, (*1)

Вычисление площади полигона в координатах WGS'84. Порт ??-алгоритма на PHP и JS. Статья источник:, (*2)

Установка

В корне модуля:, (*3)

.../geo-area-calculator-fast$ composer install

Если необходимы js-тесты:, (*4)

.../geo-area-calculator-fast$ npm install

Тесты

PHP

.../geo-area-calculator-fast$ phpunit

JavaScript

.../geo-area-calculator-fast$ npm test

Примеры

JavaScript

alert( ffGeo.getGeoPolygonAreaFast(
            [
                [ -10.812317, 18 ],
                [ 10.812317, -18 ],
                [ 26.565051,  18 ],
                [ 52.622632, -18 ],
                [ 52.622632,  54 ],
                [ 10.812317,  54 ],
                [ -10.812317, 18 ],
            ]
) );

PHP

use siddthartha\geo\area\fast\helpers\GeoAreaFastCalculator;

echo GeoAreaFastCalculator::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)

The Versions

09/12 2015

dev-master

9999999-dev

Geographical area of given polygon in WGS84

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kulikov Roman