org.geotools.geometry.iso
Class DimensionModel

java.lang.Object
  extended by org.geotools.geometry.iso.DimensionModel

public class DimensionModel
extends java.lang.Object

The class Dimension represents the dimension type of a Feature Geometry. It supports three dimension types: 2D - Geometry objects in two dimensional euclidian space with the coordinates x and y. Geometric objects in that dimension model do not store any information about height in their geometry attributes. 2.5D - Geometry objects in three dimensional euclidian space with the coordinates x and y, and owns a height attribute z. Therefore, each coordinate pair only holds one height information. This relation can be defined by the bijectional function f(x,y) -> z. 3D - Geometry objects in three dimensional euclidian space with the coordinates x, y and z. Since we are in real three dimensional space, coordinates with the same x and y values, but different z values are allowed. This provides the representation of overlaying objects like bridges over a river or tunels through a mountain. The distinction between 2d (which is in 2 dimensional euclidian space) and 2.5d (which is in 2 dimensional euclidian space) objects is essential, because the simple disctinction between the coordiante dimension (euclidian space) would make the seperation of 2d and 3d data impossible. In fact, there is a huge discrepancy in algorithms and their runtime complexity in spatial operation which treat 2d data and 3d data. 3D algorithms are usually absolutely ineffecient for 2D data, so that a seperation between the two dimensionalities must be done. However, 2d data algorithms can usually be designed in a way to treat 2.5d data correclty as well without effecting the runtime complexity.

Author:
Sanjay Dominik Jena

Field Summary
static int THREE_DIMENSIONIAL
           
static int TWO_DIMENSIONIAL
           
static int TWOoFIVE_DIMENSIONIAL
           
 
Constructor Summary
DimensionModel(int dimensionType)
          Creates a Dimension Model according to the desired dimensional type: 2D, 2.5D or 3D
 
Method Summary
 int getCoordinateDimension()
          Returns the coordiante dimension in euclidian space of the Dimension model
 int getDimensionType()
          Returns the Dimension type
 boolean is2D()
          Tests whether the Dimension Model is of two dimensional type
 boolean is2o5D()
          Tests whether the Dimension Model is of 2.5 dimensional type
 boolean is3D()
          Tests whether the Dimension Model is of three dimensional type
static int toD(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
          One of the DimensionModel constants.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TWO_DIMENSIONIAL

public static final int TWO_DIMENSIONIAL
See Also:
Constant Field Values

TWOoFIVE_DIMENSIONIAL

public static final int TWOoFIVE_DIMENSIONIAL
See Also:
Constant Field Values

THREE_DIMENSIONIAL

public static final int THREE_DIMENSIONIAL
See Also:
Constant Field Values
Constructor Detail

DimensionModel

public DimensionModel(int dimensionType)
Creates a Dimension Model according to the desired dimensional type: 2D, 2.5D or 3D

Parameters:
dimensionType -
Method Detail

toD

public static int toD(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
One of the DimensionModel constants.

Returns:
value based on crs

getDimensionType

public int getDimensionType()
Returns the Dimension type

Returns:
dimension type

getCoordinateDimension

public int getCoordinateDimension()
Returns the coordiante dimension in euclidian space of the Dimension model

Returns:
coordinate dimension in euclidian space

is2D

public boolean is2D()
Tests whether the Dimension Model is of two dimensional type

Returns:
TRUE if the Dimension Model is of two dimensional type

is2o5D

public boolean is2o5D()
Tests whether the Dimension Model is of 2.5 dimensional type

Returns:
TRUE if the Dimension Model is of 2.5 dimensional type

is3D

public boolean is3D()
Tests whether the Dimension Model is of three dimensional type

Returns:
TRUE if the Dimension Model is of three dimensional type

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.