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.
g1
- g2
- public static Geometry intersection(Geometry g1, Geometry g2)
Geometry.intersection(Geometry)
but also tries to
unroll GeometryCollections.g1
- g2
- public static Geometry unrollGeometries(Geometry geometry) throws IllegalArgumentException
geometry
- IllegalArgumentException
- when encountering illegal Geometries; message is the
Geometry class name.Copyright © 1996–2019 Geotools. All rights reserved.