toWKB
Converts a geometry object to its Well-Known Binary (WKB) representation.
Parameters
Name | Type | Default | Description |
---|---|---|---|
geometry | Geometry | The geometry object to be converted to WKB | |
options? | object | Optional WKB output configuration | |
options.dim? | 2 | 3 | 4 | 4 | Output dimensionality of the writer. |
options.flavor? | 'extended' | 'iso' | 'extended' | Output flavor of the writer. |
options.byteOrder? | 'le' | 'be' | 'le' | Output byte order of the writer. Little/Big Endian. |
options.srid? | boolean | false | Whether SRID values should be output in WKB. Many WKB readers do not support SRID values, use with caution. |
Returns
Uint8Array
A Uint8Array containing the WKB representation of the geometry