Geometry Engine - Open Source (GEOS)

Overview

Geometry Engine - Open Source (GEOS) is a C++ library for performing geometric operations on spatial data, such as calculating intersections, unions, and differences between geometric shapes. GEOS is a port of the Java Topology Suite (JTS) and provides the computational geometry backbone for many GIS applications including PostGIS, QGIS, and Shapely.

Key Concepts

Spatial predicates are boolean operations that test relationships between geometries (intersects, contains, within, touches). Spatial operations are constructive operations that produce new geometries (buffer, intersection, union, difference). Topology is the mathematical study of spatial relationships that remain unchanged under continuous deformations. Valid geometry is a geometry that conforms to OGC Simple Features rules (no self-intersection, proper ring orientation). Prepared geometry is a geometry that has been preprocessed for faster repeated operations.

Common Operations

OperationDescription
BufferCreate a polygon at a specified distance from a geometry
IntersectionReturn the common area of two geometries
UnionCombine two or more geometries
DifferenceSubtract one geometry from another
Convex HullReturn the smallest convex polygon containing a geometry
CentroidCalculate the geometric center of a geometry
SimplifyReduce the number of vertices while preserving shape

Appendix

Created: 2025-12-13 | Modified: 2025-12-13

See Also