bjornharrtell/jsts — Issue #96: getArea on MultiPolygon returns 0
Author: bjornharrtell
Created: 2012-01-09 19:15:28+00:00
State: open

For information, getArea () method with "jsts.geom.MultiPolygon" always returns 0. For example:

var reader = new jsts.io.WKTReader();
var multi = "MULTIPOLYGON(((508569.333383 6955176.6343521,524444.32481051 6949179.4153684,507158.22303389 6943887.7515592,508569.333383 6955176.6343521)),((512097.10925578 6931893.3135918,524444.32481051 6941418.3084483,523033.2144614 6927307.2049571,512097.10925578 6931893.3135918)))"
var input = reader.read(multi);
input.getArea(); result => 0
input.geometries[0].getArea(); result => 93836827.6686182
input.geometries[1].getArea(); result => 80396008.8518629