org.geotools.geometry.iso.coordinate
Class PolygonImpl

java.lang.Object
  extended by org.geotools.geometry.iso.coordinate.SurfacePatchImpl
      extended by org.geotools.geometry.iso.coordinate.PolygonImpl
All Implemented Interfaces:
java.io.Serializable, org.opengis.geometry.coordinate.GenericSurface, org.opengis.geometry.coordinate.Polygon, org.opengis.geometry.primitive.SurfacePatch
Direct Known Subclasses:
TriangleImpl

public class PolygonImpl
extends SurfacePatchImpl
implements org.opengis.geometry.coordinate.Polygon

Author:
Jackson Roehrig & Sanjay Jena A Polygon (Figure 21) is a surface patch that is defined by a set of boundary curves and an underlying surface to which these curves adhere. The default is that the curves are coplanar and the polygon uses planar interpolation in its interior.
See Also:
Serialized Form

Constructor Summary
PolygonImpl(SurfaceBoundaryImpl boundary)
          Constructor This first variant of a constructor of Polygon creates a Polygon directly from a set of boundary curves (organized into a SurfaceBoundary) which shall be defined using coplanar Positions as controlPoints.
PolygonImpl(SurfaceBoundaryImpl boundary, SurfaceImpl spanSurf)
          This second variant of a constructor of Polygon creates a Polygon lying on a spanning surface.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 double getArea()
           
 org.opengis.geometry.Envelope getEnvelope()
          Added to Class requirements of GM_SurfacePatch Returns the envelope of the SurfacePatch
 double getPerimeter()
           
 java.util.List getSpanningSurface()
           
 org.opengis.geometry.coordinate.PolyhedralSurface getSurface()
           
 double[] getUpNormal(org.opengis.geometry.DirectPosition point)
           
 int hashCode()
           
 
Methods inherited from class org.geotools.geometry.iso.coordinate.SurfacePatchImpl
getBoundary, getInterpolation, getNumDerivativesOnBoundary, setSurface
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.geometry.coordinate.Polygon
getBoundary
 
Methods inherited from interface org.opengis.geometry.primitive.SurfacePatch
getInterpolation, getNumDerivativesOnBoundary
 

Constructor Detail

PolygonImpl

public PolygonImpl(SurfaceBoundaryImpl boundary)
Constructor This first variant of a constructor of Polygon creates a Polygon directly from a set of boundary curves (organized into a SurfaceBoundary) which shall be defined using coplanar Positions as controlPoints. Polygon::Polygon(boundary : SurfaceBondary) : Polygon NOTE The meaning of exterior in the SurfaceBoundary is consistent with the plane of the constructed planar polygon.

Parameters:
boundary -

PolygonImpl

public PolygonImpl(SurfaceBoundaryImpl boundary,
                   SurfaceImpl spanSurf)
This second variant of a constructor of Polygon creates a Polygon lying on a spanning surface. There is no restriction of the types of interpolation used by the composite curves used in the SurfaceBoundary, but they must all be lie on the "spanningSurface" for the process to succeed. Polygon(boundary : SurfaceBondary, spanSurf : Surface) : Polygon NOTE It is important that the boundary components be oriented properly for this to work. It is often the case that in bounded manifolds, such as the sphere, there is an ambiguity unless the orientation is properly used.

Parameters:
boundary -
spanSurf - - the Spanning Surface of the polygon
Method Detail

getEnvelope

public org.opengis.geometry.Envelope getEnvelope()
Description copied from class: SurfacePatchImpl
Added to Class requirements of GM_SurfacePatch Returns the envelope of the SurfacePatch

Specified by:
getEnvelope in class SurfacePatchImpl
Returns:
Envelope of the CurveSegment

getSurface

public org.opengis.geometry.coordinate.PolyhedralSurface getSurface()
Specified by:
getSurface in interface org.opengis.geometry.coordinate.Polygon
Specified by:
getSurface in interface org.opengis.geometry.primitive.SurfacePatch
Overrides:
getSurface in class SurfacePatchImpl

getSpanningSurface

public java.util.List getSpanningSurface()
Specified by:
getSpanningSurface in interface org.opengis.geometry.coordinate.Polygon

getUpNormal

public double[] getUpNormal(org.opengis.geometry.DirectPosition point)
Specified by:
getUpNormal in interface org.opengis.geometry.coordinate.GenericSurface

getPerimeter

public double getPerimeter()
Specified by:
getPerimeter in interface org.opengis.geometry.coordinate.GenericSurface

getArea

public double getArea()
Specified by:
getArea in interface org.opengis.geometry.coordinate.GenericSurface

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.