public interface Geometry extends java.lang.Cloneable, Spatial
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
contains(Geometry geometry)
Check if this geometry contains the given geometry
|
boolean |
equals(Geometry geometry,
double tolerance)
Test if this is equal to the geometry up to the tolerance threshold value
|
double |
getArea(AreaUnit units)
Compute the area of this geometry using the exact mode
|
double |
getArea(AreaUnit units,
boolean isExactComputation)
Compute the area of this geometry.
|
BBox |
getBoundingBox()
Get the minimal bounding box that contains this geometry
|
<T extends Geometry> |
getContained(java.util.Collection<T> geometries)
Find geometries that are contained in this geometry.
|
<T extends Geometry> |
getContainers(java.util.Collection<T> geometries)
Find geometries that are containing this geometry.
|
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Get coordinate reference system used to represents this geometry
|
double |
getDistance(Geometry geometry,
LengthUnit units)
Compute the distance between this geometry and the given geometry.
|
double |
getHeading()
Heading in degrees from north - North is 0°, east is 90°, south is 180°, and west is 270°
|
<T extends Geometry> |
getKNearestNeighbors(java.util.Collection<T> geometries,
int k)
Find the k nearest neighbors of this geometry among a specified collection of geometries
|
Geometry |
getNearestNeighbor(java.util.Collection<? extends Geometry> geometries)
Find the nearest neighbor of this geometry among a specified collection of geometries
|
Point |
getReferencePoint()
Get the reference point for this geometry.
|
double |
getSqrDistance(Geometry geometry,
LengthUnit units)
Compute the distance between this geometry and the given geometry.
|
<T extends Geometry> |
getWithinDistance(java.util.Collection<T> geometries,
double maxDistance,
LengthUnit units)
Find geometries located within the specified distance from this geometry
|
boolean |
intersects(Geometry geometry)
Check if this geometry intersects the given geometry
|
void |
setHeading(double heading) |
void |
setReferencePoint(Point refPoint) |
java.lang.String |
toString()
String representation of the geometry
|
java.lang.String |
toString(boolean printHeader)
Get the string representation of the geometry
|
getGeometryjava.lang.String toString(boolean printHeader)
printHeader - : whether to print the geometry typeCoordinateReferenceSystem getCoordinateReferenceSystem()
boolean intersects(Geometry geometry)
geometry - boolean contains(Geometry geometry)
geometry - Geometry getNearestNeighbor(java.util.Collection<? extends Geometry> geometries)
geometries - - a collection of geometries to look for the nearest neighbor<T extends Geometry> java.util.List<T> getKNearestNeighbors(java.util.Collection<T> geometries, int k)
geometries - - a collection of geometries to look for the k nearest neighborsk - - the number of geometries to finddouble getDistance(Geometry geometry, LengthUnit units)
geometry - units - specifies unit for measuring distance.double getSqrDistance(Geometry geometry, LengthUnit units)
geometry - units - specifies unit for measuring distance.<T extends Geometry> java.util.Collection<T> getContained(java.util.Collection<T> geometries)
geometries - - all possible contained geometries<T extends Geometry> java.util.Collection<T> getContainers(java.util.Collection<T> geometries)
geometries - - a collection of all possible containing geometriesdouble getArea(AreaUnit units)
units - of areadouble getArea(AreaUnit units, boolean isExactComputation)
units - of areaisExactComputation - - whether to use an exact but non-robust method or to use planar robust computationjava.lang.Object clone()
boolean equals(Geometry geometry, double tolerance)
geometry - - geometry to test for equalitytolerance - - a threshold for the distance between the coordinates<T extends Geometry> java.util.List<T> getWithinDistance(java.util.Collection<T> geometries, double maxDistance, LengthUnit units)
geometries - a collection of geometries to filter based on the proximity to
this geometrymaxDistance - - maximal distance at which a returned geometry must beunits - - distance unitsBBox getBoundingBox()
java.lang.String toString()
toString in class java.lang.ObjectPoint getReferencePoint()
double getHeading()
void setReferencePoint(Point refPoint)
void setHeading(double heading)
© Copyright IBM 2017