ALKMaps.Format.WKT

Class for reading and writing Well-Known Text.  Create a new instance with the ALKMaps.Format.WKT constructor.

Inherits from

Summary
ALKMaps.Format.WKTClass for reading and writing Well-Known Text.
Constructor
ALKMaps.Format.WKTCreate a new parser for WKT
Functions
readDeserialize a WKT string and return a vector feature or an array of vector features.
writeSerialize a feature or array of features into a WKT string.
extractGeometryEntry point to construct the WKT for a single Geometry object.

Constructor

ALKMaps.Format.WKT

Create a new parser for WKT

Parameters

options{Object} An optional object whose properties will be set on this instance

Returns

{ALKMaps.Format.WKT} A new WKT parser.

Functions

read

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.

Parameters

wkt{String} A WKT string

Returns

{<ALKMaps.Feature.Vector>|Array} A feature or array of features for GEOMETRYCOLLECTION WKT.

write

write: function(features)

Serialize a feature or array of features into a WKT string.

Parameters

features{<ALKMaps.Feature.Vector>|Array} A feature or array of features

Returns

{String} The WKT string representation of the input geometries

extractGeometry

extractGeometry: function(geometry)

Entry point to construct the WKT for a single Geometry object.

Parameters

geometry{<ALKMaps.Geometry.Geometry>}

Returns

{String} A WKT string of representing the geometry

read: function(wkt)
Deserialize a WKT string and return a vector feature or an array of vector features.
write: function(features)
Serialize a feature or array of features into a WKT string.
extractGeometry: function(geometry)
Entry point to construct the WKT for a single Geometry object.
Create a new parser for WKT
Base class for format reading/writing a variety of formats.
Close