-
Notifications
You must be signed in to change notification settings - Fork 1
Geos
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.
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:
- geos_overlay_polygon - spatial overlay between two polygon datasets, producing all intersecting pairs with their intersection geometry
- geos_polygon_connectivity - find all pairs of adjacent or overlapping polygons
Buffers:
- geos_buffer - generic buffer operator that dispatches on the composition (polygon, arc or multipoint) of its first argument
- geos_buffer_point - creates a buffer polygon around each point
- geos_buffer_multi_point - creates a buffer polygon around each coordinate of a multipoint data item
- geos_buffer_linestring - creates a buffer polygon around each arc (linestring)
- geos_buffer_multi_polygon - creates a buffer polygon for each multi polygon
Simplification:
- geos_simplify_linestring - simplify the geometry of an arc (linestring)
- geos_simplify_multi_polygon - simplify the geometry of a multi polygon
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.
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).
- polygon operators - overview of all polygon operators
- GEOS - the GEOS project website
- cgal - CGAL library
- boost geometry - Boost Geometry library
- boost polygon - Boost Polygon library
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.