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

    Function convert

    • Convert a GeoJSON Feature to a GeoJSON Vector Feature in either a WebMercator or S2 projection

      Type Parameters

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

      Parameters

      • projection: Projection

        output either S2 or WM

      • data: JSONCollection<M, D, P>

        the data to convert

      • OptionalbuildBBox: boolean

        optional - build a bbox for the feature if desired

      • toUnitScale: boolean = false

        optional - convert to unit scale. Assumed to be true if not specified

      Returns VectorFeatures<M, D, P, VectorGeometry<D>>[]

      • the converted data