Class: Dimension

jsts.geom.Dimension

new Dimension()

Provides constants representing the dimensions of a point, a curve and a surface. Also provides constants representing the dimensions of the empty geometry and non-empty geometries, and the wildcard constant #DONTCARE meaning "any dimension". These constants are used as the entries in IntersectionMatrixs.
Source:

Members

(static, constant) A :number

Dimension value of a surface (2).
Type:
  • number
Source:

(static, constant) DONTCARE :number

Dimension value for any dimension (= {FALSE, TRUE}).
Type:
  • number
Source:

(static, constant) FALSE :number

Dimension value of the empty geometry (-1).
Type:
  • number
Source:

(static, constant) L :number

Dimension value of a curve (1).
Type:
  • number
Source:

(static, constant) P :number

Dimension value of a point (0).
Type:
  • number
Source:

(static, constant) TRUE :number

Dimension value of non-empty geometries (= {P, L, A}).
Type:
  • number
Source:

Methods

(static) toDimensionSymbol(dimensionValue) → {String}

Converts the dimension value to a dimension symbol, for example, TRUE => 'T' .
Parameters:
Name Type Description
dimensionValue number a number that can be stored in the IntersectionMatrix . Possible values are {TRUE, FALSE, DONTCARE, 0, 1, 2}.
Source:
Returns:
a character for use in the string representation of an IntersectionMatrix. Possible values are {T, F, * , 0, 1, 2} .
Type
String

(static) toDimensionValue(dimensionSymbol) → {number}

Converts the dimension symbol to a dimension value, for example, '*' => DONTCARE .
Parameters:
Name Type Description
dimensionSymbol string a character for use in the string representation of an IntersectionMatrix. Possible values are {T, F, * , 0, 1, 2} .
Source:
Returns:
a number that can be stored in the IntersectionMatrix . Possible values are {TRUE, FALSE, DONTCARE, 0, 1, 2}.
Type
number