WKT class
A static class for reading/writing Well Known Text (WKT) strings as GeoJSON geometries.
Methods
| read(string) | Reads the data in well-known text format and returns the geometry. If the geometry is a GeometryCollection, an array of geometries is returned. |
| write(azmaps, number, boolean) | Writes geometry data as well-known text. |
Method Details
read(string)
Reads the data in well-known text format and returns the geometry. If the geometry is a GeometryCollection, an array of geometries is returned.
static function read(wkt: string)
Parameters
- wkt
-
string
Well-known text string data that needs to be parsed into geometries.
Returns
azmaps.data.Geometry[]
write(azmaps, number, boolean)
Writes geometry data as well-known text.
static function write(data: azmaps, coordinatePrecision?: number, includeElev?: boolean)
Parameters
- data
-
azmaps
Geometry data to be written as well-known text. Array of geometries will be written as geometry collections.
- coordinatePrecision
-
number
The number of decimal places to round coordinates to. Default: 6.
- includeElev
-
boolean
Specifies if elevation data, stored in 3rd value of Position, should be written. If set to true and no elevation data in Position, will default to 0.
Returns
string