GEOS

GEOS is a C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software. It implements the OGC Simple Features geometry model and provides all the spatial functions in that standard as well as many others. GEOS is a core dependency of PostGIS, QGIS, GDAL, and Shapely.

If you need support using the GEOS library or would like to get involved in the community check out the Support page.

Capabilities

Spatial Model and Functions

  • Geometry Model: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection
  • Predicates: Intersects, Touches, Disjoint, Crosses, Within, Contains, Overlaps, Equals, Covers
  • Operations: Union, Distance, Intersection, Symmetric Difference, Convex Hull, Envelope, Buffer, Simplify, Polygon Assembly, Valid, Area, Length,
  • Prepared geometry (using internal spatial indexes)
  • Spatial Indexes: STR (Sort-Tile-Recursive) packed R-tree spatial index
  • Input/Output: OGC Well Known Text (WKT) and Well Known Binary (WKB) readers and writers.

API Features

  • C API (provides long-term API and ABI stability)
  • C++ API (will likely change across versions)
  • Thread safety (using the reentrant C API)

License

GEOS is open source software available under the terms of GNU Lesser General Public License (LGPL).

Governance

The GEOS project is run by a Project Steering Committee made up of developers and contributors to the project and is a project of OSGeo. We strive to keep our day-to-day interactions collegial and welcoming within a basic Code of Conduct.

Relationship to JTS

GEOS started as a direct port to C++ of the JTS Topology Suite (JTS), and remains tightly bound to that project. Most core algorithms have been developed in JTS and ported to GEOS when complete.

The projects share testing data. This helps to ascertain when failures are caused by differences in implementation (GEOS fails and JTS does not) and when they are caused by algorithm (both libraries fail).

Citation

To cite GEOS in publications use:

GEOS contributors (2021). GEOS computational geometry library. Open Source Geospatial Foundation. URL https://libgeos.org/.

A BibTeX entry for LaTeX users is

@Manual{,
  title = {{GEOS} coordinate transformation software library},
  author = {{GEOS contributors}},
  organization = {Open Source Geospatial Foundation},
  year = {2021},
  url = {https://libgeos.org/},
}