org.deegree.geometry.standard.surfacepatches
Class DefaultRectangle

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

public class DefaultRectangle
extends Object
implements Rectangle

Default implementation of Rectangle.

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
DefaultRectangle(LinearRing exterior)
          Creates a new DefaultRectangle instance from the given parameters.
 
Method Summary
 Measure getArea(Unit requestedBaseUnit)
          Returns the area covered by the patch.
 List<LinearRing> 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.
 LinearRing getExteriorRing()
          Returns the sequence of control points as a LinearRing.
 List<Ring> getInteriorRings()
          Returns the interior rings (holes) of the patch.
 Point getPoint1()
          Returns the first of the four control points.
 Point getPoint2()
          Returns the second of the four control points.
 Point getPoint3()
          Returns the third of the four control points.
 Point getPoint4()
          Returns the last of the four control points.
 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

DefaultRectangle

public DefaultRectangle(LinearRing exterior)
Creates a new DefaultRectangle instance from the given parameters.

Parameters:
exterior - ring that contains exactly five planar points, the first and last point must be identical
Method Detail

getExteriorRing

public LinearRing getExteriorRing()
Description copied from interface: Rectangle
Returns the sequence of control points as a LinearRing.

Specified by:
getExteriorRing in interface PolygonPatch
Specified by:
getExteriorRing in interface Rectangle
Returns:
the exterior ring

getPoint1

public Point getPoint1()
Description copied from interface: Rectangle
Returns the first of the four control points.

Specified by:
getPoint1 in interface Rectangle
Returns:
the first control point

getPoint2

public Point getPoint2()
Description copied from interface: Rectangle
Returns the second of the four control points.

Specified by:
getPoint2 in interface Rectangle
Returns:
the second control point

getPoint3

public Point getPoint3()
Description copied from interface: Rectangle
Returns the third of the four control points.

Specified by:
getPoint3 in interface Rectangle
Returns:
the third control point

getPoint4

public Point getPoint4()
Description copied from interface: Rectangle
Returns the last of the four control points.

Specified by:
getPoint4 in interface Rectangle
Returns:
the last control point

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

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

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<LinearRing> getBoundaryRings()
Description copied from interface: PolygonPatch
Returns the boundary rings (interior + exteriors)

Specified by:
getBoundaryRings in interface PolygonPatch
Specified by:
getBoundaryRings in interface Rectangle
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.