Skip to main content

fromWKT

Creates a Geometry from Well-Known Text (WKT) representation.

Parameters​

NameTypeDefaultDescription
wktstringString containing WKT representation of the geometry
options?objectOptional WKT input configuration
options.fix?booleanfalseAutomatically repair structural errors in the input (currently just unclosed rings) while reading.

Returns​

Geometry

A new geometry object created from the WKT string

Throws​

See also​

Examples​

will fix unclosed ring