Package mil.nga.sf
Class CurvePolygon<T extends Curve>
- java.lang.Object
-
- mil.nga.sf.Geometry
-
- mil.nga.sf.Surface
-
- mil.nga.sf.CurvePolygon<T>
-
- Type Parameters:
T
- curve type
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Polygon
public class CurvePolygon<T extends Curve> extends Surface
A planar surface defined by an exterior ring and zero or more interior ring. Each ring is defined by a Curve instance.- Author:
- osbornb
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description CurvePolygon()
ConstructorCurvePolygon(boolean hasZ, boolean hasM)
ConstructorCurvePolygon(List<T> rings)
ConstructorCurvePolygon(CurvePolygon<T> curvePolygon)
Copy Constructorprotected
CurvePolygon(GeometryType type, boolean hasZ, boolean hasM)
ConstructorCurvePolygon(T ring)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRing(T ring)
Add a ringvoid
addRings(List<T> rings)
Add ringsGeometry
copy()
Copy the geometryboolean
equals(Object obj)
T
getExteriorRing()
Get the exterior ringT
getInteriorRing(int n)
Returns the Nth interior ring for this PolygonT
getRing(int n)
Returns the Nth ring where the exterior ring is at 0, interior rings begin at 1List<T>
getRings()
Get the ringsint
hashCode()
boolean
isEmpty()
Is the Geometry emptyboolean
isSimple()
Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangencyint
numInteriorRings()
Get the number of interior ringsint
numRings()
Get the number of rings including exterior and interiorvoid
setRings(List<T> rings)
Set the rings-
Methods inherited from class mil.nga.sf.Geometry
expandEnvelope, getCentroid, getDegreesCentroid, getDimension, getEnvelope, getGeometryType, hasM, hasZ, is3D, isMeasured, setHasM, setHasZ, updateZM
-
-
-
-
Constructor Detail
-
CurvePolygon
public CurvePolygon()
Constructor
-
CurvePolygon
public CurvePolygon(boolean hasZ, boolean hasM)
Constructor- Parameters:
hasZ
- has zhasM
- has m
-
CurvePolygon
public CurvePolygon(T ring)
Constructor- Parameters:
ring
- ring
-
CurvePolygon
public CurvePolygon(CurvePolygon<T> curvePolygon)
Copy Constructor- Parameters:
curvePolygon
- curve polygon to copy
-
CurvePolygon
protected CurvePolygon(GeometryType type, boolean hasZ, boolean hasM)
Constructor- Parameters:
type
- geometry typehasZ
- has zhasM
- has m
-
-
Method Detail
-
addRing
public void addRing(T ring)
Add a ring- Parameters:
ring
- ring
-
numRings
public int numRings()
Get the number of rings including exterior and interior- Returns:
- number of rings
-
getRing
public T getRing(int n)
Returns the Nth ring where the exterior ring is at 0, interior rings begin at 1- Parameters:
n
- nth ring to return- Returns:
- ring
-
getExteriorRing
public T getExteriorRing()
Get the exterior ring- Returns:
- exterior ring
-
numInteriorRings
public int numInteriorRings()
Get the number of interior rings- Returns:
- number of interior rings
-
getInteriorRing
public T getInteriorRing(int n)
Returns the Nth interior ring for this Polygon- Parameters:
n
- interior ring number- Returns:
- interior ring
-
copy
public Geometry copy()
Copy the geometry
-
isEmpty
public boolean isEmpty()
Is the Geometry empty
-
isSimple
public boolean isSimple()
Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangency
-
-