|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kaboum.geom.KaboumGeometry
org.kaboum.geom.KaboumPolygon
public class KaboumPolygon
Basic implementation of Polygon.
| Field Summary | |
|---|---|
protected KaboumLinearRing[] |
holes
The interior boundaries, if any. |
protected KaboumLinearRing |
shell
The exterior boundary |
| Fields inherited from class org.kaboum.geom.KaboumGeometry |
|---|
WKT_LINESTRING, WKT_POINT, WKT_POLYGON |
| Constructor Summary | |
|---|---|
KaboumPolygon(KaboumLinearRing shell)
Constructs a Polygon with the given exterior boundary. |
|
KaboumPolygon(KaboumLinearRing shell,
KaboumLinearRing[] holes)
Constructs a Polygon with the given exterior boundary and
interior boundaries. |
|
| Method Summary | |
|---|---|
void |
addCoordinate(KaboumCoordinate internal)
|
void |
addCoordinateInHoleN(KaboumCoordinate internal,
int i)
|
java.lang.Object |
clone()
Perform an exact copy of this object |
protected KaboumExtent |
computeExtentInternal()
|
boolean |
equalsExact(KaboumGeometry other)
|
double |
getArea()
Compute area for this polygon |
KaboumCoordinate[] |
getCoordinates()
Returns this Geometry s vertices. |
int |
getDimension()
|
KaboumExtent |
getExtent()
|
KaboumCoordinate[] |
getExteriorCoordinates()
Returns this Geometry s exterior vertices. |
int |
getExteriorNumPoints()
|
KaboumLineString |
getExteriorRing()
|
java.lang.String |
getGeometryType()
|
KaboumLineString |
getInteriorRingN(int n)
|
int |
getNumInteriorRing()
|
int |
getNumPoints()
Returns the count of this Geometrys vertices. |
double |
getPerimeter()
Compute perimeter for this polygon |
boolean |
isClosed()
|
boolean |
isEmpty()
|
void |
normalize()
|
boolean |
setCoordinates(KaboumCoordinate[] internals)
By default, adding coordinates to a Polygon is equivalent to adding coordinates to the shell |
void |
setHoles(KaboumLinearRing[] _holes)
|
| Methods inherited from class org.kaboum.geom.KaboumGeometry |
|---|
addCoordinateInGeometryN, getGeometryN, getNumGeometries, hasNonEmptyElements, hasNullElements, indexOf, isEquivalentClass, minCoordinate, removeGeometry, reversePointOrder, scroll |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected KaboumLinearRing shell
protected KaboumLinearRing[] holes
| Constructor Detail |
|---|
public KaboumPolygon(KaboumLinearRing shell)
Polygon with the given exterior boundary.
The shell and holes must conform to the assertions specified in the OpenGIS Simple Features
Specification for SQL.
shell - the outer boundary of the new Polygon.
Must be oriented clockwise.
public KaboumPolygon(KaboumLinearRing shell,
KaboumLinearRing[] holes)
Polygon with the given exterior boundary and
interior boundaries.
shell - the outer boundary of the new Polygon.
Must be oriented clockwise.holes - the inner boundaries of the new Polygon.
Each must be oriented counterclockwise.| Method Detail |
|---|
public KaboumCoordinate[] getCoordinates()
KaboumGeometryGeometry s vertices.
getCoordinates in class KaboumGeometryGeometrypublic KaboumCoordinate[] getExteriorCoordinates()
KaboumGeometryGeometry s exterior vertices.
getExteriorCoordinates in class KaboumGeometryGeometrypublic boolean setCoordinates(KaboumCoordinate[] internals)
setCoordinates in class KaboumGeometryGeometrypublic int getNumPoints()
KaboumGeometryGeometrys vertices.
getNumPoints in class KaboumGeometryGeometrypublic int getExteriorNumPoints()
getExteriorNumPoints in class KaboumGeometrypublic int getDimension()
getDimension in class KaboumGeometrypublic boolean isEmpty()
isEmpty in class KaboumGeometrypublic KaboumLineString getExteriorRing()
public int getNumInteriorRing()
public KaboumLineString getInteriorRingN(int n)
public java.lang.String getGeometryType()
getGeometryType in class KaboumGeometryprotected KaboumExtent computeExtentInternal()
public boolean equalsExact(KaboumGeometry other)
equalsExact in class KaboumGeometrypublic java.lang.Object clone()
KaboumGeometry
clone in class KaboumGeometrypublic void normalize()
normalize in class KaboumGeometrypublic boolean isClosed()
isClosed in class KaboumGeometrypublic KaboumExtent getExtent()
getExtent in class KaboumGeometrypublic double getArea()
getArea in class KaboumGeometrypublic double getPerimeter()
getPerimeter in class KaboumGeometrypublic void addCoordinate(KaboumCoordinate internal)
addCoordinate in class KaboumGeometry
public void addCoordinateInHoleN(KaboumCoordinate internal,
int i)
public void setHoles(KaboumLinearRing[] _holes)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||