Geometry Engine, Open Source [MIRROR]
C++ Ruby M4 Makefile Python CMake Other
Failed to load latest commit information.
capi Apply clang-tidy-4.0 modernize-use-override Sep 9, 2017
cmake Add GenerateSourceGroups macro. Nov 26, 2014
debian Complete Note#1 in the Jan 16, 2012
doc Use GeometryFactory::Ptr instead of old unique_ptr alias Sep 7, 2017
include fixing conversion warnings closes #852 Feb 5, 2018
macros Set C++11 as required standard Sep 7, 2017
src Merge branch 'fixing-warning' of cvvergara/geos into master Jan 21, 2018
swig Update ruby binding build scripts Jun 20, 2014
tests Merge branch 't-856' of cvvergara/geos into master Feb 6, 2018
tools [CMake] No need to run cmake.exe in VS command prompt Sep 11, 2017
.drone.yml Update drone yml to 0.5 version Oct 28, 2016
.editorconfig Stackwalker.cpp uses 2 space indent while XMLTester.cpp 2 space Jul 14, 2017
.gitignore Rename geos_svn_revision.h to geos_revision.h Mar 31, 2017
.gitlab-ci.yml Install a fake git2cl in gitlab-ci Oct 27, 2016
.travis.yml [Travis] Add build jobs with multiple GCC and clang versions Sep 9, 2017
.vimrc Complete implementation of SharedPathsOp Nov 29, 2010
AUTHORS Update my email address Nov 10, 2016
CMakeLists.txt cmake: improving handling version Jan 10, 2018
COPYING Fix FSF address in license file (#662) Sep 10, 2013
HOWTO_RELEASE cmake: improving handling version Jan 10, 2018
INSTALL Prepare for RC4 release. Dec 8, 2009 Make trailing blanks check portable Oct 4, 2017
NEWS Add note about USE_UNSTABLE_GEOS_CPP_API Jan 6, 2018 Clarify C++ API has not been deprecated Oct 1, 2017
TODO Triangulation API was ported Apr 8, 2017
acsite.m4 git-svn-id: 5242fede-7e19-0410-a… Jul 31, 2013
appveyor.yml [AppVeyor] Fix build environment for VS2017 and NMAKE Sep 10, 2017
autogen.bat [CMake] Simplify generation of geos_revision.h Apr 7, 2017 Stop symlinking as README Oct 27, 2016 Emit a warning at compile time about C++ API being unstable Oct 7, 2017 Removed Subversion Id keyword from all text files (#480) Sep 23, 2011
nmake.opt Recognise NMAKE version from VS2017 15.4.0 Oct 11, 2017

GEOS -- Geometry Engine, Open Source

Project homepage:

Build status

branch / CI Debbie Winnie Dronie Travis CI GitLab CI AppVeyor
master debbie winnie dronie travis gitlab-ci appveyor
svn-3.6 debbie winnie dronie travis gitlab-ci appveyor

More on:

Building, testing, installing


Using Autotools:

./  # in ${srcdir}, if obtained from SVN or GIT
${srcdir}/configure # in build dir

Using CMake:

cmake ${srcdir} # in build dir

Now, all versions:

make check
make install # as root
ldconfig # as root

Microsoft Windows

If you use Microsoft Visual C++ (7.1 or later) compiler, you can build GEOS using NMAKE program and provided files.

If you are building from SVN or GIT checkout, first run: autogen.bat Then:

nmake /f MSVC_VER=1400

where 1400 is version number of Visual C++ compiler, here Visual C++ 8.0 from Visual Studio 2005 (supported versions are 1300, 1310, 1400, 1500, 1600, 1700, 1800 and 1900). The bootstrap.bat step is required to generate a couple of header files.

In order to build debug configuration of GEOS, additional flag DEBUG=1 is required:

nmake /f MSVC_VER=1400 DEBUG=1

Client applications

Using the C interface (recommended)

GEOS promises long term stability of C API

The C library uses the C++ interface, but the C library follows normal ABI-change-sensitive versioning, so programs that link only against the C library should work without relinking when GEOS is upgraded.

To compile programs against the C lib (recommended):

CFLAGS += `geos-config --cflags`
LDFLAGS += `geos-config --ldflags` -lgeos_c
#include <geos_c.h>

Example usage:

capi/geostest.c contains basic usage examples.

Using the C++ interface (no stability promise)

Developers who decide to use the C++ interface should be aware GEOS does not promise API or ABI stability of C++ API between releases. Moreover C++ API/ABI breaking changes may not even be announced or include in the NEWS file

The C++ library name will change on every minor release because it is too hard to know if there have been ABI changes.

To compile programs against the C++ lib:

CFLAGS += `geos-config --cflags`
LDFLAGS += `geos-config --ldflags` -lgeos
#include <geos.h>

Basic usage examples can be found in doc/example.cpp.

Scripting language bindings

Ruby bindings are fully supported. To build, use the --enable-ruby option when configuring:

./configure ... --enable-ruby

Since version 3.6.0 PHP bindings are not included in the core library anymore but available as a separate project:

Since version 3.0, the Python bindings are unsupported. Recommended options:

  1. Become or recruit a new maintainer.
  2. Use Shapely with Python versions 2.4 or greater.
  3. Simply call functions from libgeos_c via Python ctypes.


To build Doxygen documentation:

cd doc
make doxygen-html