org.deegree.geometry.standard.surfacepatches
Class DefaultPolygonPatch

java.lang.Object
  extended by org.deegree.geometry.standard.surfacepatches.DefaultPolygonPatch
All Implemented Interfaces:
PolygonPatch, SurfacePatch

public class DefaultPolygonPatch
extends Object
implements PolygonPatch

Default implementation of PolygonPatch.

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.patches.PolygonPatch
PolygonPatch.PolygonPatchType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.patches.SurfacePatch
SurfacePatch.SurfacePatchType
 
Constructor Summary
DefaultPolygonPatch(Ring exteriorRing, List<Ring> interiorRings)
          Creates a new DefaultPolygonPatch instance from the given parameters.
 
Method Summary
 Measure getArea(Unit requestedBaseUnit)
          Returns the area covered by the patch.
 List<Ring> getBoundaryRings()
          Returns the boundary rings (interior + exteriors)
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the patch is embedded in.
 Ring getExteriorRing()
          Returns the exterior ring of the patch.
 List<Ring> getInteriorRings()
          Returns the interior rings (holes) of the patch.
 PolygonPatch.PolygonPatchType getPolygonPatchType()
           
 SurfacePatch.SurfacePatchType getSurfacePatchType()
          Returns the type of surface patch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPolygonPatch

public DefaultPolygonPatch(Ring exteriorRing,
                           List<Ring> interiorRings)
Creates a new DefaultPolygonPatch instance from the given parameters.

Parameters:
exteriorRing - ring that defines the outer boundary, may be null (see section 9.2.2.5 of GML spec)
interiorRings - list of rings that define the inner boundaries, may be empty or null
Method Detail

getCoordinateDimension

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

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

getArea

public Measure getArea(Unit requestedBaseUnit)
Description copied from interface: SurfacePatch
Returns the area covered by the patch.

Specified by:
getArea in interface SurfacePatch
Returns:
area covered by the patch in the requested uom

getExteriorRing

public Ring getExteriorRing()
Description copied from interface: PolygonPatch
Returns the exterior ring of the patch.

Please note that the exterior may be empty (null). The following explanation is from the GML 3.1.1 spec (section 9.2.2.5): In the normal 2D case, one of these rings is distinguished as being the exterior boundary. In a general manifold this is not always possible, in which case all boundaries shall be listed as interior boundaries, and the exterior will be empty.

Specified by:
getExteriorRing in interface PolygonPatch
Returns:
the exterior ring, or null

getInteriorRings

public List<Ring> getInteriorRings()
Description copied from interface: PolygonPatch
Returns the interior rings (holes) of the patch.

Specified by:
getInteriorRings in interface PolygonPatch
Returns:
the interior rings (holes) of the patch, list may be empty (but not null)

getBoundaryRings

public List<Ring> getBoundaryRings()
Description copied from interface: PolygonPatch
Returns the boundary rings (interior + exteriors)

Specified by:
getBoundaryRings in interface PolygonPatch
Returns:
the boundary rings, list may be empty (but not null)

getSurfacePatchType

public SurfacePatch.SurfacePatchType getSurfacePatchType()
Description copied from interface: SurfacePatch
Returns the type of surface patch.

Specified by:
getSurfacePatchType in interface SurfacePatch
Returns:
the type of surface patch

getPolygonPatchType

public PolygonPatch.PolygonPatchType getPolygonPatchType()
Specified by:
getPolygonPatchType in interface PolygonPatch
Returns:
the type of this polygon patch.


Copyright © 2011. All Rights Reserved.