Skip to content
Jip Claassens edited this page Jul 7, 2026 · 2 revisions

GEOS (Geometry Engine, Open Source) is a C/C++ geometry library, developed as a port of the Java JTS Topology Suite. It implements the OGC Simple Features geometry model and is also used by, among others, QGIS, PostGIS and Shapely. In the GeoDMS, GEOS is used alongside the cgal, boost geometry and boost polygon libraries for geometric functions (functions with the geos_ prefix).

GEOS-based operators in the GeoDMS perform their calculations on double precision (float64) coordinates. Unlike the boost polygon operators, coordinates do not need to be cast to integer values first. For most polygon operations, the geos_ operators are the recommended choice, as they combine good performance with reliable results.

operators

Element-by-element set operations on two polygon data items:

  • geos_intersect - element-wise intersection of two polygon arrays; also invoked by the * and & operators for fpoint/dpoint polygon data items
  • geos_union - element-wise union of two polygon arrays; also invoked by the + and | operators for fpoint/dpoint polygon data items
  • geos_difference - element-wise difference of two polygon arrays (A minus B); also invoked by the - operator for fpoint/dpoint polygon data items
  • geos_xor - element-wise symmetric difference of two polygon arrays; also invoked by the ^ operator for fpoint/dpoint polygon data items

Cleaning, dissolving and splitting:

  • geos_polygon - clean and validate polygon geometry
  • geos_union_polygon - dissolve all polygons into one, optionally grouped by a partition attribute
  • geos_split_polygon - split multi-polygons into individual single-polygon parts, each as a separate domain entry
  • geos_split_union_polygon - dissolve polygons (optionally grouped by attribute), then split into individual parts

Overlay and connectivity:

Buffers:

Simplification:

relation to the bg_, bp_ and cgal_ families

The GeoDMS offers geometric operations based on four libraries, recognizable by the prefix of the function name:

  • geos_: GEOS, double precision coordinates, recommended for most use cases
  • bg_: boost geometry, floating point coordinates
  • bp_: boost polygon, integer coordinates only
  • cgal_: cgal, exact predicates and constructions, for cases where maximum numerical precision is required

Several bg_ operators were succeeded by their geos_ equivalents; for new model configurations the geos_ variants are advised. See polygon operators for the full overview per library.

since version

Most geos_ operators are available since GeoDMS version 14.0. The family has been extended in later versions, for instance with geos_buffer_multi_polygon (version 18) and the generic geos_buffer (version 20.2.0).

see also

Clone this wiki locally