GeometriesΒΆ
jeo utilizes the JTS library for geometry support.
The Geom class adds additional convenience methods for working with geometry objects such as methods for quickly building commonly used geometry types.
Point point = Geom.point(30,10);
LineString line = Geom.lineString(30,10, 10,30, 40,40);
Polygon poly = Geom.polygon(30,10, 40,40, 20,40, 10,20, 30,10);
The GeomBuilder class provides a convenient builder for composing more complex geometry types.
MultiPolygon multiPoly = Geom.build()
.points(40,40, 20,45, 45,30, 40,40).ring()
.points(20,35, 10,30, 10,10, 30,5, 45,20, 20,35)
.polygon()
.points(30,20, 20,15, 20,25, 30,20)
.polygon()
.toMultiPolygon();