|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Geometry s 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()
KaboumGeometry
Geometry
s vertices.
getCoordinates
in class KaboumGeometry
Geometry
public KaboumCoordinate[] getExteriorCoordinates()
KaboumGeometry
Geometry
s exterior vertices.
getExteriorCoordinates
in class KaboumGeometry
Geometry
public boolean setCoordinates(KaboumCoordinate[] internals)
setCoordinates
in class KaboumGeometry
Geometry
public int getNumPoints()
KaboumGeometry
Geometry
s vertices.
getNumPoints
in class KaboumGeometry
Geometry
public int getExteriorNumPoints()
getExteriorNumPoints
in class KaboumGeometry
public int getDimension()
getDimension
in class KaboumGeometry
public boolean isEmpty()
isEmpty
in class KaboumGeometry
public KaboumLineString getExteriorRing()
public int getNumInteriorRing()
public KaboumLineString getInteriorRingN(int n)
public java.lang.String getGeometryType()
getGeometryType
in class KaboumGeometry
protected KaboumExtent computeExtentInternal()
public boolean equalsExact(KaboumGeometry other)
equalsExact
in class KaboumGeometry
public java.lang.Object clone()
KaboumGeometry
clone
in class KaboumGeometry
public void normalize()
normalize
in class KaboumGeometry
public boolean isClosed()
isClosed
in class KaboumGeometry
public KaboumExtent getExtent()
getExtent
in class KaboumGeometry
public double getArea()
getArea
in class KaboumGeometry
public double getPerimeter()
getPerimeter
in class KaboumGeometry
public 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 |