JTS Topology Suite
JTS Topology Suite is an open source library of spatial predicates and functions for processing geometries. JTS provides a complete, consistent, and robust implementation of fundamental algorithms for processing linear geometry on the 2-dimensional cartesian plane.
JTS Topology Suite provides an object model for planar geometry together with a set of fundamental geometric functions. JTS conforms to the Simple Features Specification for SQL published by the Open GIS Consortium. JTS is designed to be used as a core component of vector-based geomatics software such as geographical information systems. It can also be used as a general-purpose library providing algorithms in computational geometry.