deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.geometry.standard.primitive
Class DefaultTin

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.primitive.DefaultTin
All Implemented Interfaces:
Geometry, GeometricPrimitive, Surface, Tin, TriangulatedSurface, GMLObject

public class DefaultTin
extends AbstractDefaultGeometry
implements Tin

Default implementation of Tin.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.Surface
Surface.SurfaceType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.GeometricPrimitive
GeometricPrimitive.PrimitiveType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.Geometry
Geometry.GeometryType
 
Field Summary
 
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
crs, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultTin(String id, CRS crs, PrecisionModel pm, List<List<LineStringSegment>> stopLines, List<List<LineStringSegment>> breakLines, Length maxLength, Points controlPoints, List<Triangle> patches)
          Creates a new DefaultTin instance from the given parameters.
DefaultTin(String id, CRS crs, PrecisionModel pm, List<Triangle> patches)
          Creates a new DefaultTin instance from the given parameters.
 
Method Summary
 Measure getArea(Unit requestedBaseUnit)
           
 List<List<LineStringSegment>> getBreakLines()
          Returns the break lines that must be respected by the triangulation.
 Point getCentroid()
          Returns the centroid of the geometry.
 Points getControlPoints()
          Returns the control points (vertices) of the triangles.
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.
 Points getExteriorRingCoordinates()
          Convenience method for accessing the control points of the exterior ring of a simple polygon surface.
 Geometry.GeometryType getGeometryType()
          Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY.
 List<Points> getInteriorRingsCoordinates()
          Convenience method for accessing the control points of the interior rings of a simple polygon surface.
 Measure getMaxLength(Unit requestedUnit)
          Returns the maximum length of all triangle side.
 List<Triangle> getPatches()
          Returns the patches that constitute this surface.
 Measure getPerimeter(Unit requestedUnit)
           
 GeometricPrimitive.PrimitiveType getPrimitiveType()
          Must always return GeometricPrimitive.PrimitiveType.Surface.
 List<List<LineStringSegment>> getStopLines()
          Returns the stop lines that must be respected by the triangulation.
 Surface.SurfaceType getSurfaceType()
          Must always return Surface.SurfaceType.Tin.
 
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
buildJTSGeometry, contains, createFromJTS, crosses, equals, getAsDefaultGeometry, getBuffer, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getGMLProperties, getId, getIntersection, getJTSGeometry, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, toString, touches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.geometry.Geometry
contains, crosses, equals, getBuffer, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 

Constructor Detail

DefaultTin

public DefaultTin(String id,
                  CRS crs,
                  PrecisionModel pm,
                  List<Triangle> patches)
Creates a new DefaultTin instance from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
patches - the triangle that constitute the result of the triangulation

DefaultTin

public DefaultTin(String id,
                  CRS crs,
                  PrecisionModel pm,
                  List<List<LineStringSegment>> stopLines,
                  List<List<LineStringSegment>> breakLines,
                  Length maxLength,
                  Points controlPoints,
                  List<Triangle> patches)
Creates a new DefaultTin instance from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
stopLines -
breakLines -
maxLength -
controlPoints -
patches - the triangle that constitute the result of the triangulation
Method Detail

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: Geometry
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.

Specified by:
getCoordinateDimension in interface Geometry
Returns:
the coordinate dimension

getArea

public Measure getArea(Unit requestedBaseUnit)
Specified by:
getArea in interface Surface
Returns:
area of the surface

getCentroid

public Point getCentroid()
Description copied from interface: Geometry
Returns the centroid of the geometry.

Specified by:
getCentroid in interface Geometry
Overrides:
getCentroid in class AbstractDefaultGeometry
Returns:
a Point that is the centroid of this geometry

getPatches

public List<Triangle> getPatches()
Description copied from interface: TriangulatedSurface
Returns the patches that constitute this surface.

Specified by:
getPatches in interface Surface
Specified by:
getPatches in interface TriangulatedSurface
Returns:
the patches that constitute this surface

getPerimeter

public Measure getPerimeter(Unit requestedUnit)
Specified by:
getPerimeter in interface Surface
Returns:
perimeter of the surface

getPrimitiveType

public GeometricPrimitive.PrimitiveType getPrimitiveType()
Description copied from interface: Surface
Must always return GeometricPrimitive.PrimitiveType.Surface.

Specified by:
getPrimitiveType in interface GeometricPrimitive
Specified by:
getPrimitiveType in interface Surface
Returns:
GeometricPrimitive.PrimitiveType.Surface

getSurfaceType

public Surface.SurfaceType getSurfaceType()
Description copied from interface: Tin
Must always return Surface.SurfaceType.Tin.

Specified by:
getSurfaceType in interface Surface
Specified by:
getSurfaceType in interface Tin
Specified by:
getSurfaceType in interface TriangulatedSurface
Returns:
Surface.SurfaceType.Tin

getGeometryType

public Geometry.GeometryType getGeometryType()
Description copied from interface: GeometricPrimitive
Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY.

Specified by:
getGeometryType in interface Geometry
Specified by:
getGeometryType in interface GeometricPrimitive
Returns:
must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY

getStopLines

public List<List<LineStringSegment>> getStopLines()
Description copied from interface: Tin
Returns the stop lines that must be respected by the triangulation.

Specified by:
getStopLines in interface Tin
Returns:
the stop lines

getBreakLines

public List<List<LineStringSegment>> getBreakLines()
Description copied from interface: Tin
Returns the break lines that must be respected by the triangulation.

Specified by:
getBreakLines in interface Tin
Returns:
the break lines

getMaxLength

public Measure getMaxLength(Unit requestedUnit)
Description copied from interface: Tin
Returns the maximum length of all triangle side.

Specified by:
getMaxLength in interface Tin
Parameters:
requestedUnit - units-of-measure that the length shall be expressed as, or null for units of the underlying coordinate system
Returns:
the length in the the requested uom

getControlPoints

public Points getControlPoints()
Description copied from interface: Tin
Returns the control points (vertices) of the triangles.

Specified by:
getControlPoints in interface Tin
Returns:
the control points

getExteriorRingCoordinates

public Points getExteriorRingCoordinates()
Description copied from interface: Surface
Convenience method for accessing the control points of the exterior ring of a simple polygon surface.

NOTE: This method is only safe to use when the surface consists of a single planar patch that has a linear interpolated exterior ring.

Specified by:
getExteriorRingCoordinates in interface Surface
Returns:
the control points

getInteriorRingsCoordinates

public List<Points> getInteriorRingsCoordinates()
Description copied from interface: Surface
Convenience method for accessing the control points of the interior rings of a simple polygon surface.

NOTE: This method is only safe to use when the surface consists of a single planar patch that has linear interpolated interior rings.

Specified by:
getInteriorRingsCoordinates in interface Surface
Returns:
the control points

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>