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

org.deegree.geometry.standard.primitive
Class DefaultTriangulatedSurface

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

public class DefaultTriangulatedSurface
extends AbstractDefaultGeometry
implements TriangulatedSurface

Default implementation of TriangulatedSurface.

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
DefaultTriangulatedSurface(String id, CRS crs, PrecisionModel pm, List<Triangle> patches)
          Creates a new DefaultTriangulatedSurface instance from the given parameters.
 
Method Summary
 Measure getArea(Unit requestedBaseUnit)
           
 Point getCentroid()
          Returns the centroid of the geometry.
 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.
 List<Triangle> getPatches()
          Returns the patches that constitute this surface.
 Measure getPerimeter(Unit requestedUnit)
           
 GeometricPrimitive.PrimitiveType getPrimitiveType()
          Must always return GeometricPrimitive.PrimitiveType.Surface.
 Surface.SurfaceType getSurfaceType()
          Must always return Surface.SurfaceType.TriangulatedSurface.
 
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

DefaultTriangulatedSurface

public DefaultTriangulatedSurface(String id,
                                  CRS crs,
                                  PrecisionModel pm,
                                  List<Triangle> patches)
Creates a new DefaultTriangulatedSurface 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 - patches that constitute the surface
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: TriangulatedSurface
Must always return Surface.SurfaceType.TriangulatedSurface.

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

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

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

]]>