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

    Function sphericalDistance

    • Returns the distance between two points given the spherical radius in meters (defaults to earth's radius)

      Parameters

      • lon1: number

        the first longitude

      • lat1: number

        the first latitude

      • lon2: number

        the second longitude

      • lat2: number

        the second latitude

      • planetRadius: number = EARTH_RADIUS

        the radius of the planet (Earth by default)

      Returns number

      • the distance