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

    Function polygonRingArea

    • Calculate the approximate area of the polygon ring if were it projected onto the planet. Note that this area will be positive if ring is oriented counter-clockwise, otherwise it will be negative.

      Reference: Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion Laboratory, Pasadena, CA, June 2007 https://trs.jpl.nasa.gov/handle/2014/40409

      Type Parameters

      • M extends Properties = Properties

      Parameters

      • coords: VectorLineString<M>

        ring Coordinates in lon-lat space

      • planetRadius: number

        the radius of the planet (Earth by default)

      Returns number

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