org.deegree.geometry.standard.primitive
Class DefaultSolid

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.primitive.DefaultSolid
All Implemented Interfaces:
GMLObject, Object, TypedObjectNode, Geometry, GeometricPrimitive, Solid

public class DefaultSolid
extends AbstractDefaultGeometry
implements Solid

Default implementation of Solid.

Version:
$Revision: 31641 $, $Date: 2011-08-24 21:24:55 +0200 (Wed, 24 Aug 2011) $
Author:
Markus Schneider , last edited by: $Author: mschneider $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.Solid
Solid.SolidType
 
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, env, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultSolid(String id, ICRS crs, PrecisionModel pm, Surface exteriorSurface, List<Surface> interiorSurfaces)
          Creates a new DefaultSolid instance from the given parameters.
 
Method Summary
 Measure getArea(Unit requestedBaseUnit)
           
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.
 Envelope getEnvelope()
          Returns the minimal bounding box of the geometry.
 Surface getExteriorSurface()
          Returns the exterior surface (shell) of the solid.
 Geometry.GeometryType getGeometryType()
          Must always return Geometry.GeometryType#PRIMITIVE_GEOMETRY.
 List<Surface> getInteriorSurfaces()
          Returns the interior surfaces of the solid.
 GeometricPrimitive.PrimitiveType getPrimitiveType()
          Must always return GeometricPrimitive.PrimitiveType.Solid.
 Solid.SolidType getSolidType()
          Returns the type of solid.
 Measure getVolume(Unit requestedBaseUnit)
           
 
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
buildJTSGeometry, contains, createFromJTS, crosses, equals, getAsDefaultGeometry, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getGMLProperties, getId, getIntersection, getJTSGeometry, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isSFSCompliant, 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, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isSFSCompliant, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.commons.tom.gml.GMLObject
getGMLProperties
 

Constructor Detail

DefaultSolid

public DefaultSolid(String id,
                    ICRS crs,
                    PrecisionModel pm,
                    Surface exteriorSurface,
                    List<Surface> interiorSurfaces)
Creates a new DefaultSolid instance from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
exteriorSurface - the exterior surface (shell) of the solid, may be null
interiorSurfaces - the interior surfaces of the solid, may be null or empty
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

getExteriorSurface

public Surface getExteriorSurface()
Description copied from interface: Solid
Returns the exterior surface (shell) of the solid.

Please note that this method may return null. The following explanation is from the GML 3.1.1 schema (geometryPrimitives.xsd): In normal 3-dimensional Euclidean space, one (composite) surface is distinguished as the exterior. In the more general case, this is not always possible.

Specified by:
getExteriorSurface in interface Solid
Returns:
the exterior surface, or null if no surface is distinguished as being the exterior boundary

getInteriorSurfaces

public List<Surface> getInteriorSurfaces()
Description copied from interface: Solid
Returns the interior surfaces of the solid.

Specified by:
getInteriorSurfaces in interface Solid
Returns:
the interior surfaces, list may be empty (but not null)

getPrimitiveType

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

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

getSolidType

public Solid.SolidType getSolidType()
Description copied from interface: Solid
Returns the type of solid.

Specified by:
getSolidType in interface Solid
Returns:
the type of solid

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

getArea

public Measure getArea(Unit requestedBaseUnit)
Specified by:
getArea in interface Solid
Returns:
area of the solid's boundary

getVolume

public Measure getVolume(Unit requestedBaseUnit)
Specified by:
getVolume in interface Solid
Returns:
volume of the solid

getEnvelope

public Envelope getEnvelope()
Description copied from interface: Geometry
Returns the minimal bounding box of the geometry.

Specified by:
getEnvelope in interface Geometry
Overrides:
getEnvelope in class AbstractDefaultGeometry
Returns:
the minimal bounding box of the geometry


Copyright © 2011. All Rights Reserved.