com.vividsolutions.jts.geom

Class Dimension


public class Dimension
extends java.lang.Object

Constants representing the dimensions of a point, a curve and a surface. Also, constants representing the dimensions of the empty geometry and non-empty geometries, and a wildcard dimension meaning "any dimension".
Version:
1.6

Field Summary

static int
A
Dimension value of a surface (2).
static int
DONTCARE
Dimension value for any dimension (= {FALSE, TRUE}).
static int
FALSE
Dimension value of the empty geometry (-1).
static int
L
Dimension value of a curve (1).
static int
P
Dimension value of a point (0).
static int
TRUE
Dimension value of non-empty geometries (= {P, L, A}).

Method Summary

static char
toDimensionSymbol(int dimensionValue)
Converts the dimension value to a dimension symbol, for example, TRUE => 'T' .
static int
toDimensionValue(char dimensionSymbol)
Converts the dimension symbol to a dimension value, for example, '*' => DONTCARE .

Field Details

A

public static final int A
Dimension value of a surface (2).
Field Value:
2

DONTCARE

public static final int DONTCARE
Dimension value for any dimension (= {FALSE, TRUE}).
Field Value:
-3

FALSE

public static final int FALSE
Dimension value of the empty geometry (-1).
Field Value:
-1

L

public static final int L
Dimension value of a curve (1).
Field Value:
1

P

public static final int P
Dimension value of a point (0).
Field Value:
0

TRUE

public static final int TRUE
Dimension value of non-empty geometries (= {P, L, A}).
Field Value:
-2

Method Details

toDimensionSymbol

public static char toDimensionSymbol(int dimensionValue)
Converts the dimension value to a dimension symbol, for example, TRUE => 'T' .
Parameters:
dimensionValue - a number that can be stored in the IntersectionMatrix . Possible values are {TRUE, FALSE, DONTCARE, 0, 1, 2}.
Returns:
a character for use in the string representation of an IntersectionMatrix. Possible values are {T, F, * , 0, 1, 2} .

toDimensionValue

public static int toDimensionValue(char dimensionSymbol)
Converts the dimension symbol to a dimension value, for example, '*' => DONTCARE .
Parameters:
dimensionSymbol - a character for use in the string representation of an IntersectionMatrix. Possible values are {T, F, * , 0, 1, 2} .
Returns:
a number that can be stored in the IntersectionMatrix . Possible values are {TRUE, FALSE, DONTCARE, 0, 1, 2}.