Official GEOS git repository
 
 
 
 
 
 
Go to file
Sandro Santilli 4ff201dfd8 Put building prerequisite in a common section 2018-10-07 18:28:23 +02:00
capi Fixed documented return codes of GEOSGeomGetX() and friends. 2018-09-18 22:51:04 +05:00
cmake Add GenerateSourceGroups macro. 2014-11-26 14:58:35 +00:00
debian Complete Note#1 in the http://wiki.osgeo.org/wiki/GEOS_Provenance_Review to get out of incubation. 2012-01-16 18:00:20 +00:00
doc Applying patches for Closes #742 2018-06-14 10:03:22 -05:00
include Store SortedPackedIntervalRTree leaf and branch nodes in vectors 2018-09-26 15:18:21 -04:00
macros Applying patches for Closes #742 2018-06-14 10:03:22 -05:00
src Remove empty file 2018-09-26 15:18:21 -04:00
swig Applying patches for Closes #742 2018-06-14 10:03:22 -05:00
tests Merge branch 'empty-crash-unary-union' of https://github.com/sir-sigurd/libgeos into sir-sigurd-empty-crash-unary-union 2018-09-23 21:32:00 -04:00
tools Fix skipping override of unchanged geos_revision.h 2018-10-04 16:36:16 +02:00
.drone.yml Update drone yml to 0.5 version 2016-10-28 15:18:10 +00:00
.editorconfig Stackwalker.cpp uses 2 space indent while XMLTester.cpp 2 space 2017-07-14 15:52:06 +02:00
.gitignore Rename geos_svn_revision.h to geos_revision.h 2017-03-31 19:26:16 +00:00
.gitlab-ci.yml don't use docker, backer more or less as it was. Works on my gitlab fork. 2018-06-13 13:48:50 -04:00
.travis.yml [Travis] Add build jobs with multiple GCC and clang versions 2017-09-10 00:40:15 +02:00
.vimrc Complete implementation of SharedPathsOp 2010-11-29 09:33:24 +00:00
AUTHORS Update Martin's email address 2018-08-01 19:13:27 -04:00
CMakeLists.txt fix shadow problems (Closes #857) 2018-08-28 21:58:33 -05:00
COPYING Fix FSF address in license file (#662) 2013-09-10 07:06:18 +00:00
HOWTO_RELEASE Closes #921 Added new way to change version for cmake build 2018-08-26 00:58:18 +02:00
INSTALL Prepare for RC4 release. 2009-12-08 22:47:47 +00:00
Makefile.am Add .editorconfig to distribution, closes #920 for geos 3.8.0 2018-08-27 12:36:16 -04:00
NEWS Prepping for geos 3.7.0rc1 release 2018-08-19 01:13:24 -04:00
README.md Put building prerequisite in a common section 2018-10-07 18:28:23 +02:00
TODO Triangulation API was ported 2017-04-08 18:14:51 +02:00
acsite.m4 git-svn-id: http://svn.osgeo.org/geos/trunk@3855 5242fede-7e19-0410-aef8-94bd7d2200fb 2013-07-31 14:13:07 +00:00
appveyor.yml removing -V from ctest execution Closes #908 2018-08-30 20:49:54 -05:00
autogen.bat [CMake] Simplify generation of geos_revision.h 2017-04-07 14:12:12 +02:00
autogen.sh Stop symlinking README.md as README 2016-10-27 14:13:56 +00:00
configure.ac revise sed check for parsing version so works on all GNU compliant sed. References #917 for 3.8.0 2018-08-27 13:25:12 -04:00
makefile.vc Removed Subversion Id keyword from all text files (#480) 2011-09-23 01:03:54 +00:00
nmake.opt Recognise NMAKE version from VS2017 15.4.0 2017-10-11 17:22:02 +01:00

README.md

GEOS -- Geometry Engine, Open Source

Project homepage: http://geos.osgeo.org/

Build status

branch / CI Debbie Winnie Dronie Travis CI GitLab CI AppVeyor Bessie Bessie32
master debbie winnie dronie travis gitlab-ci appveyor bessie bessie32
3.7 debbie winnie dronie travis gitlab-ci appveyor
3.6 debbie winnie dronie travis gitlab-ci appveyor

More on: https://trac.osgeo.org/geos#BuildandInstall

Building, testing, installing

Prerequisites

Building GEOS requires a C++11 compiler

Unix

Using Autotools:

./autogen.sh  # in ${srcdir}, if obtained from SVN or GIT
(mkdir obj && cd obj && ../configure)

Using CMake:

(mkdir build && cd build && cmake ..)

Either Autotools or CMake

make
make check
make install # (as root, assuming PREFIX is not writable by the build user)

On a GNU/Linux system, if installed in a system prefix:
  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 makefile.vc files.

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

nmake /f makefile.vc 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 makefile.vc MSVC_VER=1400 DEBUG=1

Client applications

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:

https://git.osgeo.org/gogs/geos/php-geos

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.

Documentation

To build Doxygen documentation:

cd doc
make doxygen-html