Generate Well-Known Binary (WKB) from coordinates.
Produces little-endian WKB (byte order = 1).
coords
Float64Array
[lng0, lat0, lng1, lat1, ...]
geometry_type
"POINT"
"LINESTRING"
"POLYGON"
"MULTIPOINT"
const wkb = toWkb(coords, "LINESTRING"); Copy
const wkb = toWkb(coords, "LINESTRING");
Generate Well-Known Binary (WKB) from coordinates.
Produces little-endian WKB (byte order = 1).
Arguments
coords: FlatFloat64Array[lng0, lat0, lng1, lat1, ...].geometry_type:"POINT","LINESTRING","POLYGON","MULTIPOINT".Example