Calculate the area (in square meters) of a GeoJSON polygon or multipolygon.
import 'package:area/area.dart';
const world = {
'type': 'Polygon',
'coordinates': [
[
[-180, -90],
[-180, 90],
[180, 90],
[180, -90],
[-180, -90]
]
]
};
print(area(world));
Just run:
$ pub run test/area_test.dart