Package org.geolatte.geom
Interface ProjectedGeometryOperations
-
- All Known Implementing Classes:
JTSGeometryOperations
public interface ProjectedGeometryOperationsDefines standard operations onGeometrys with projected coordinate systems.The semantics of the operations is as specified in Simple Feature Access - Part 1: common architecture
- Author:
- Karel Maesen, Geovise BVBA
-
-
Field Summary
Fields Modifier and Type Field Description static ProjectedGeometryOperationsDefaultDefault implementation of this interface
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <P extends C2D,G extends Geometry<P> & Polygonal<P>>
doublearea(G geometry)Calculates the area of the specifiedGeometry.<P extends C2D>
Geometry<P>boundary(Geometry<P> geometry)Calculates the boundary of the specifiedGeometry.<P extends C2D>
Geometry<P>buffer(Geometry<P> geometry, double distance)Calculates aGeometrythat represents all points whose distance from the specifiedGeometryis less than or equal the specified distance.<P extends C2D,G extends Geometry<P> & Polygonal<P>>
Point<P>centroid(G geometry)Calculates a centroid for the specifiedGeometry.<P extends C2D>
booleancontains(Geometry<P> geometry, Geometry<P> other)Checks if the first specifiedGeometryspatially contains the second.<P extends C2D>
Geometry<P>convexHull(Geometry<P> geometry)Calculates the convex hull of the specifiedGeometry.<P extends C2D>
booleancrosses(Geometry<P> geometry, Geometry<P> other)Checks if the specifiedGeometrys cross.<P extends C2D>
Geometry<P>difference(Geometry<P> geometry, Geometry<P> other)Calculates the point set difference of the specifiedGeometrys.<P extends C2D>
doubledistance(Geometry<P> geometry, Geometry<P> other)Calculates the shortest distance between any two points in the twoGeometrys in the coordinate reference system of thisGeometry.<P extends C2D>
Geometry<P>intersection(Geometry<P> geometry, Geometry<P> other)Calculates the point set intersection of the specifiedGeometrys.<P extends C2D>
booleanintersects(Geometry<P> geometry, Geometry<P> other)Checks if the specifiedGeometrys intersect.<P extends C2D>
booleanisSimple(Geometry<P> geometry)Tests the simplicity of the specifiedGeometry.<P extends C2D,G extends Geometry<P> & Linear<P>>
doublelength(G geometry)Calculates the length of the specifiedGeometry.<P extends C2D>
booleanoverlaps(Geometry<P> geometry, Geometry<P> other)Checks if the specifiedGeometrys overlap.<P extends C2D>
booleanrelates(Geometry<P> geometry, Geometry<P> other, String matrix)Checks if the specifiedGeometrys are spatially related by testing for intersections between the interior, boundary and exterior of the two geometric objects as specified by the values in the intersection pattern matrix.<P extends C2D,G extends Geometry<P>>
Greverse(G geometry)Creates aGeometrywith the positions of the inputGeometryin reverse order.<P extends C2D>
Geometry<P>symmetricDifference(Geometry<P> geometry, Geometry<P> other)Calculates the point set symmetric difference of the specifiedGeometrys.<P extends C2D>
booleantouches(Geometry<P> geometry, Geometry<P> other)Checks if the specifiedGeometrys touch.<P extends C2D>
Geometry<P>union(Geometry<P> geometry, Geometry<P> other)Calculates the point set union of the specifiedGeometrys.
-
-
-
Field Detail
-
Default
static final ProjectedGeometryOperations Default
Default implementation of this interface
-
-
Method Detail
-
isSimple
<P extends C2D> boolean isSimple(Geometry<P> geometry)
Tests the simplicity of the specifiedGeometry.- Parameters:
geometry- theGeometryto test for simplicity.- Returns:
- True iff the specified
Geometryis simple.
-
boundary
<P extends C2D> Geometry<P> boundary(Geometry<P> geometry)
Calculates the boundary of the specifiedGeometry.- Parameters:
geometry- theGeometryfor which to calculate the boundary.- Returns:
- a
Geometryrepresenting the boundary of the specifiedGeometry.
-
reverse
<P extends C2D,G extends Geometry<P>> G reverse(G geometry)
Creates aGeometrywith the positions of the inputGeometryin reverse order.- Parameters:
geometry- theGeometryto reverse- Returns:
- a
Geometrywith the same positions as the specified inputGeometrybut in reverse order
-
intersects
<P extends C2D> boolean intersects(Geometry<P> geometry, Geometry<P> other)
Checks if the specifiedGeometrys intersect.- Parameters:
geometry- the firstGeometryoperand of the intersection testother- the secondGeometryoperand of the intersection test- Returns:
- true iff the specified
Geometrys spatially intersect
-
touches
<P extends C2D> boolean touches(Geometry<P> geometry, Geometry<P> other)
Checks if the specifiedGeometrys touch.- Parameters:
geometry- the firstGeometryoperand of the touch testother- the secondGeometryoperand of the touch test- Returns:
- true iff the specified
Geometrys spatially touch
-
crosses
<P extends C2D> boolean crosses(Geometry<P> geometry, Geometry<P> other)
Checks if the specifiedGeometrys cross.- Parameters:
geometry- the firstGeometryoperand of the cross testother- the secondGeometryoperand of the cross test- Returns:
- true iff the specified
Geometrys spatially cross
-
contains
<P extends C2D> boolean contains(Geometry<P> geometry, Geometry<P> other)
Checks if the first specifiedGeometryspatially contains the second.- Parameters:
geometry- the firstGeometryoperand of the containment testother- the secondGeometryoperand of the containment test- Returns:
- true iff the first specified
Geometryspatially contains the second
-
overlaps
<P extends C2D> boolean overlaps(Geometry<P> geometry, Geometry<P> other)
Checks if the specifiedGeometrys overlap.- Parameters:
geometry- the firstGeometryoperand of the overlap testother- the secondGeometryoperand of the overlap test- Returns:
- true iff the specified
Geometrys spatially overlap
-
relates
<P extends C2D> boolean relates(Geometry<P> geometry, Geometry<P> other, String matrix)
Checks if the specifiedGeometrys are spatially related by testing for intersections between the interior, boundary and exterior of the two geometric objects as specified by the values in the intersection pattern matrix. This returns false if all the tested intersections are empty except exterior (this) intersect exterior (another).- Parameters:
geometry- the firstGeometryoperand of the relates testother- the secondGeometryoperand of the relates testmatrix- the intersection pattern matrix- Returns:
- true iff this instance intersects the specifed other
Geometry
-
distance
<P extends C2D> double distance(Geometry<P> geometry, Geometry<P> other)
Calculates the shortest distance between any two points in the twoGeometrys in the coordinate reference system of thisGeometry. Only the X/Y-coordinates are used in the distance calculation; M- and Z-coordinates are ignored.- Parameters:
geometry- the firstGeometryother- the secondGeometry- Returns:
- the shortest distance between the two specified
Geometries
-
buffer
<P extends C2D> Geometry<P> buffer(Geometry<P> geometry, double distance)
Calculates aGeometrythat represents all points whose distance from the specifiedGeometryis less than or equal the specified distance.Calculations are in the
CoordinateReferenceSystemof thisGeometry.Z- or M-coordinates are ignored in the buffering operation; and the result will always be a 2D geometry.
- Parameters:
geometry- theGeometryfor which to calculate the bufferdistance- the buffer distance- Returns:
- a 2D
Geometryrepresenting the buffer of the specifiedGeometrywith the specified distance.
-
convexHull
<P extends C2D> Geometry<P> convexHull(Geometry<P> geometry)
Calculates the convex hull of the specifiedGeometry.- Parameters:
geometry- theGeometryfor which to calculate the convex hull.- Returns:
- the convex hull for the specified
Geometry.
-
intersection
<P extends C2D> Geometry<P> intersection(Geometry<P> geometry, Geometry<P> other)
Calculates the point set intersection of the specifiedGeometrys.- Parameters:
geometry- the firstGeometryother- the secondGeometry- Returns:
- a
Geometryrepresenting the point set intersection between the two specifiedGeometries
-
union
<P extends C2D> Geometry<P> union(Geometry<P> geometry, Geometry<P> other)
Calculates the point set union of the specifiedGeometrys.- Parameters:
geometry- the firstGeometryother- the secondGeometry- Returns:
- a
Geometryrepresenting the point set union between the two specifiedGeometries
-
difference
<P extends C2D> Geometry<P> difference(Geometry<P> geometry, Geometry<P> other)
Calculates the point set difference of the specifiedGeometrys.- Parameters:
geometry- the firstGeometryother- the secondGeometry- Returns:
- a
Geometryrepresenting the point set difference between the two specifiedGeometries
-
symmetricDifference
<P extends C2D> Geometry<P> symmetricDifference(Geometry<P> geometry, Geometry<P> other)
Calculates the point set symmetric difference of the specifiedGeometrys.- Parameters:
geometry- the firstGeometryother- the secondGeometry- Returns:
- a
Geometryrepresenting the point set symmetric difference between the two specifiedGeometries
-
length
<P extends C2D,G extends Geometry<P> & Linear<P>> double length(G geometry)
Calculates the length of the specifiedGeometry.- Parameters:
geometry- the Geometry- Returns:
- the length of the specified Geometry
-
area
<P extends C2D,G extends Geometry<P> & Polygonal<P>> double area(G geometry)
Calculates the area of the specifiedGeometry.- Parameters:
geometry- the Geometry- Returns:
- the area of the specified Geometry
-
-