gis-tools-ts - v0.6.0
    Preparing search index...

    Function polygonsArea

    • Find the area of a collection of polygons. Assumes geometry is in lon-lat space

      Type Parameters

      • M = Record<string, unknown>
      • D extends Properties = Properties
      • P extends Properties = Properties

      Parameters

      • polygons:
            | VectorMultiPolygon<D>
            | VectorMultiPolygonGeometry<D>
            | VectorFeature<M, D, P, VectorMultiPolygonGeometry<D>>

        the collection of polygons

      • planetRadius: number = EARTH_RADIUS

        the radius of the planet (Earth by default). Set to 1 if you want the raw area

      Returns number

      • the total area of the polygon in square meters