IsSimpleOp.java | Class | Tests whether a Geometry is simple.
In general, the SFS specification of simplicity
follows the rule:
- A Geometry is simple if and only if the only self-intersections are at
boundary points.
This definition relies on the definition of boundary points.
The SFS uses the Mod-2 rule to determine which points are on the boundary of
lineal geometries, but this class supports
using other
BoundaryNodeRule s as well.
Simplicity is defined for each
Geometry subclass as follows:
- Valid polygonal geometries are simple by definition, so
isSimple trivially returns true.
(Hint: in order to check if a polygonal geometry has self-intersections,
use
Geometry.isValid ).
- Linear geometries are simple iff they do not self-intersect at points
other than boundary points.
|