Class for reading and writing Well-Known Text. Create a new instance with the ALKMaps.Format.WKT constructor.
ALKMaps. | Class for reading and writing Well-Known Text. |
Constructor | |
ALKMaps. | Create a new parser for WKT |
Functions | |
read | Deserialize a WKT string and return a vector feature or an array of vector features. |
write | Serialize a feature or array of features into a WKT string. |
extractGeometry | Entry point to construct the WKT for a single Geometry object. |
Create a new parser for WKT
options | {Object} An optional object whose properties will be set on this instance |
{ALKMaps.Format.WKT} A new WKT parser.
read: function( wkt )
Deserialize a WKT string and return a vector feature or an array of vector features. Supports WKT for POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and GEOMETRYCOLLECTION.
wkt | {String} A WKT string |
{<ALKMaps.Feature.Vector>|Array} A feature or array of features for GEOMETRYCOLLECTION WKT.
Deserialize a WKT string and return a vector feature or an array of vector features.
read: function( wkt )
Serialize a feature or array of features into a WKT string.
write: function( features )
Entry point to construct the WKT for a single Geometry object.
extractGeometry: function( geometry )