wasm-spatial-core
    Preparing search index...

    Function toWkt

    • Generate a Well-Known Text (WKT) string from coordinates.

      Arguments

      • coords: Flat Float64Array [lng0, lat0, lng1, lat1, ...].
      • geometry_type: Geometry type string: "POINT", "LINESTRING", "POLYGON", "MULTIPOINT".

      Example

      const wkt = toWkt(coords, "LINESTRING");
      

      Parameters

      • coords: Float64Array
      • geometry_type: string

      Returns string