Area

Calculate the area (in square meters) of a GeoJSON polygon or multipolygon.

Usage

import 'package:area/area.dart';

const world = {
  'type': 'Polygon',
  'coordinates': [
    [
      [-180, -90],
      [-180, 90],
      [180, 90],
      [180, -90],
      [-180, -90]
    ]
  ]
};

print(area(world));

Tests

Just run:

$ pub run test/area_test.dart

Credit

Libraries

area