Class: WktObject

WktObject(type)

new WktObject(type)

THis shouldn't be initiated from outside. It is only for internal use. Every other WKT Objects are themselves WktObject
Parameters:
Name Type Description
type String Textual representation of the type of current object.
Source:

Members

coordinates :Array.<Position>|Array.<Location>

Type:
Source:

options :Object

Options contains information relevant for parsing of this specific Object. Basically processed tokens, parsed coordinates and amounts of parntheses used to find out whether the object was already finished.
Type:
  • Object
Source:

type :WKTType

Type of this object.
Type:
  • WKTType
Source:

Methods

addCoordinates()

Array containing latitude, longitude and potentially either altitude or LRS.
Source:

(protected) commaWithoutCoordinates(options)

Used by Multi objects to delineate the internal objects. This is default implementation doing nothing.
Parameters:
Name Type Description
options Object Options specifying current status of the implementation
Properties
Name Type Description
coordinates Array.<Number> Passed in coordinates
leftParenthesis Number Amount of the left parenthesis
rightParenthesis Number Amount of the right parenthesis
tokens Array.<Object> Processed tokens.
Source:

handleToken(token)

Token handling is delegated to the objects.
Parameters:
Name Type Description
token Object It contains type and value.
Source:

isFinished() → {Boolean}

It returns true when the object is finished.
Source:
Returns:
True if the parentheses are closed, false otherwise
Type
Boolean

set3d()

It sets the information that this object is actually represented in 3D
Source:

setLrs()

It sets the information that the object contain information about LRS offset.
Source:

setOptions(text, currentObject)

It sets the options of the current object. This means setting up the 3D and the linear space.
Parameters:
Name Type Description
text String Specific text used as options.
currentObject WktObject Object to apply the options to.
Source:

shapes() → {Array.<Renderable>}

It is used to retrieve and create the shape or shapes associated.
Source:
Returns:
Array of renderables associated with given shape.
Type
Array.<Renderable>