brick / geo

GIS geometry library for PHP
MIT License
220 stars 31 forks source link

Update GeometryCollection.php - add area() #38

Closed timhj closed 1 year ago

timhj commented 2 years ago

Allow for area to be calculated across GeometryCollections. Adding an area() method that returns the aggregate area of all surface geometries in the collection. Returns 0 if no surface geometries are included in the collection.

BenMorel commented 1 year ago

Hi, thanks for your PR. In version 0.8, area() has been removed from geometries, and is now only available on the GeometryEngine, which makes this PR obsolete.

I guess this logic will have to stay in your app!