public class IntersectUtils extends Object
Constructor and Description |
---|
IntersectUtils() |
Modifier and Type | Method and Description |
---|---|
static Geometry |
intersection(Geometry g1,
Geometry g2)
Return the intersection of two Geometries.
|
static boolean |
intersects(Geometry g1,
Geometry g2)
Tests whether the two geometries intersect.
|
static Geometry |
unrollGeometries(Geometry geometry)
Flatten all first-level (i.e. non recursively) bundles (GeometryCollections and
MultiPolygons) into a GeometryCollection.
|
public static boolean intersects(Geometry g1, Geometry g2)
This method relies completely on Geometry.intersects(Geometry)
but also tries to
unroll GeometryCollections.
public static Geometry intersection(Geometry g1, Geometry g2)
Geometry.intersection(Geometry)
but also tries to
unroll GeometryCollections.public static Geometry unrollGeometries(Geometry geometry) throws IllegalArgumentException
IllegalArgumentException
- when encountering illegal Geometries; message is the
Geometry class name.Copyright © 1996–2023 Geotools. All rights reserved.