wasm-spatial-core
    Preparing search index...

    Function toWkb

    • Generate Well-Known Binary (WKB) from coordinates.

      Produces little-endian WKB (byte order = 1).

      Arguments

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

      Example

      const wkb = toWkb(coords, "LINESTRING");
      

      Parameters

      • coords: Float64Array
      • geometry_type: string

      Returns Uint8Array