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

    Function polygonArea

    • Find the area of a polygon. Assumes geometry is in Lon-Lat space

      Type Parameters

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

      Parameters

      • polygon:
            | VectorPolygon<D>
            | VectorPolygonGeometry<D>
            | VectorFeature<M, D, P, VectorPolygonGeometry<D>>

        the polygon

      • planetRadius: number = EARTH_RADIUS

        the radius of the planet (Earth by default)

      Returns number

      • The approximate signed geodesic area of the polygon in square meters.