|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kaboum.geom.KaboumGeometry
public abstract class KaboumGeometry
This class define a geometry i.e. a geometrical object such as a Point, a Linestring or a polygon object.
Field Summary | |
---|---|
static java.lang.String |
WKT_LINESTRING
|
static java.lang.String |
WKT_POINT
CONSTANTS Definition |
static java.lang.String |
WKT_POLYGON
|
Constructor Summary | |
---|---|
KaboumGeometry()
|
Method Summary | |
---|---|
void |
addCoordinate(KaboumCoordinate internal)
|
void |
addCoordinateInGeometryN(KaboumCoordinate internal,
int i)
|
java.lang.Object |
clone()
Perform an exact copy of this object |
abstract boolean |
equalsExact(KaboumGeometry other)
|
abstract double |
getArea()
|
abstract KaboumCoordinate[] |
getCoordinates()
Returns this Geometry s vertices. |
abstract int |
getDimension()
|
abstract KaboumExtent |
getExtent()
|
abstract KaboumCoordinate[] |
getExteriorCoordinates()
Returns this Geometry s exterior vertices. |
abstract int |
getExteriorNumPoints()
|
KaboumGeometry |
getGeometryN(int n)
Return the number og geometries |
abstract java.lang.String |
getGeometryType()
|
int |
getNumGeometries()
Return the number og geometries |
abstract int |
getNumPoints()
Returns the count of this Geometry s vertices. |
abstract double |
getPerimeter()
|
protected static boolean |
hasNonEmptyElements(KaboumGeometry[] geometries)
Returns true if the array contains any non-empty Geometry s. |
protected static boolean |
hasNullElements(java.lang.Object[] array)
Returns true if the array contains any null elements. |
protected static int |
indexOf(KaboumCoordinate coordinate,
KaboumCoordinate[] coordinates)
Returns the index of coordinate in coordinates . |
abstract boolean |
isClosed()
|
abstract boolean |
isEmpty()
|
protected boolean |
isEquivalentClass(KaboumGeometry other)
Return true if this geometry got the same class of other geometry |
protected static KaboumCoordinate |
minCoordinate(KaboumCoordinate[] coordinates)
Returns the minimum coordinate. |
abstract void |
normalize()
|
boolean |
removeGeometry(KaboumGeometry inputGeometry)
Always returns false |
protected static void |
reversePointOrder(KaboumCoordinate[] coordinates)
Flips the positions of the elements in the array so that the last is first. |
protected static void |
scroll(KaboumCoordinate[] coordinates,
KaboumCoordinate firstCoordinate)
Shifts the positions of the coordinates until firstCoordinate is first. |
abstract boolean |
setCoordinates(KaboumCoordinate[] internals)
Fill a SIMPLE geometry with input coordinates list |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String WKT_POINT
public static final java.lang.String WKT_LINESTRING
public static final java.lang.String WKT_POLYGON
Constructor Detail |
---|
public KaboumGeometry()
Method Detail |
---|
protected boolean isEquivalentClass(KaboumGeometry other)
protected static void reversePointOrder(KaboumCoordinate[] coordinates)
coordinates
- the array to rearrangeprotected static KaboumCoordinate minCoordinate(KaboumCoordinate[] coordinates)
coordinates
- the array to search in
protected static void scroll(KaboumCoordinate[] coordinates, KaboumCoordinate firstCoordinate)
coordinates
- the array to rearrangefirstCoordinate
- the coordinate to make firstprotected static boolean hasNullElements(java.lang.Object[] array)
null
elements.
array
- an array to validate
true
if any of array
s elements are
null
protected static boolean hasNonEmptyElements(KaboumGeometry[] geometries)
Geometry
s.
geometries
- an array of Geometry
sprotected static int indexOf(KaboumCoordinate coordinate, KaboumCoordinate[] coordinates)
coordinate
in coordinates
.
The first position is 0; the second, 1; etc.
coordinate
- the Coordinate
to search forcoordinates
- the array to search
coordinate
, or -1 if it is
not foundpublic java.lang.Object clone()
clone
in class java.lang.Object
public int getNumGeometries()
public boolean removeGeometry(KaboumGeometry inputGeometry)
public KaboumGeometry getGeometryN(int n)
public void addCoordinate(KaboumCoordinate internal)
public void addCoordinateInGeometryN(KaboumCoordinate internal, int i)
public abstract KaboumCoordinate[] getCoordinates()
Geometry
s vertices.
Geometry
public abstract KaboumCoordinate[] getExteriorCoordinates()
Geometry
s exterior vertices.
Geometry
public abstract boolean setCoordinates(KaboumCoordinate[] internals)
Geometry
public abstract int getNumPoints()
Geometry
s vertices.
Geometry
public abstract int getExteriorNumPoints()
public abstract boolean isClosed()
public abstract int getDimension()
public abstract java.lang.String getGeometryType()
public abstract void normalize()
public abstract boolean equalsExact(KaboumGeometry other)
public abstract KaboumExtent getExtent()
public abstract double getArea()
public abstract double getPerimeter()
public abstract boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |