cellArea method

  1. @override
double cellArea(
  1. BigInt h3Index,
  2. H3Units unit
)
override

Calculates exact area of a given cell in square units (e.g. m^2)

Implementation

@override
double cellArea(BigInt h3Index, H3Units unit) {
  switch (unit) {
    case H3Units.m:
      return _h3c.cellAreaM2(h3Index.toInt());
    case H3Units.km:
      return _h3c.cellAreaKm2(h3Index.toInt());
    case H3Units.rad:
      return _h3c.cellAreaRads2(h3Index.toInt());
  }
}