From 8bbb9f5e30ea7bf55b42db39c16db0ca012c4f0a Mon Sep 17 00:00:00 2001 From: maxogden Date: Sat, 23 Apr 2011 16:59:46 -0700 Subject: [PATCH] add credit --- geojson-utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geojson-utils.js b/geojson-utils.js index a5425f5..82eac5a 100755 --- a/geojson-utils.js +++ b/geojson-utils.js @@ -100,6 +100,7 @@ return (6371 * c) * 1000; // returns meters }, + // adapted from http://paulbourke.net/geometry/polyarea/javascript.txt gju.area = function(points) { var area = 0; // TODO: polygon holes at coordinates[1] @@ -118,6 +119,7 @@ return area; }, + // adapted from http://paulbourke.net/geometry/polyarea/javascript.txt gju.centroid = function(polygon) { var f, x = 0, y = 0; // TODO: polygon holes at coordinates[1]