GEOS  3.13.0dev
C++ interface

Overview

Main class is geos::geom::Geometry, from which all geometry types derive.

Construction and destruction of Geometries is done using geos::geom::GeometryFactory.

You'll feed it geos::geom::CoordinateSequence for base geometries or vectors of geometries for collections.

If you need to construct geometric shaped geometries, you can use geos::geom::GeometricShapeFactory.

GEOS version info (as a string) can be obtained using geos::geom::geosversion(). The JTS version this release has been ported from is available throu geos::geom::jtsport().

Input / Output

For WKT input/output you can use geos::io::WKTReader and geos::io::WKTWriter

For WKB input/output you can use geos::io::WKBReader and geos::io::WKBWriter

Exceptions

Internal exceptions are thrown as instances geos::util::GEOSException or derived classes. GEOSException derives from std::exception.

Note that prior to version 3.0.0, GEOSException were thrown by pointer, and did not derive from std::exception.