Official GEOS git repository
 
 
 
 
 
 
Go to file
Regina Obe 3fe3c03ae6 Merge branch 'fixing-warning' of cvvergara/geos into master 2018-01-20 22:28:38 -08:00
capi Apply clang-tidy-4.0 modernize-use-override 2017-09-09 22:23:43 +02: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 Use GeometryFactory::Ptr instead of old unique_ptr alias 2017-09-07 19:08:31 +02:00
include Merge branch 'fixing-warning' of cvvergara/geos into master 2018-01-20 22:28:38 -08:00
macros Set C++11 as required standard 2017-09-07 11:59:14 +02:00
src Merge branch 'fixing-warning' of cvvergara/geos into master 2018-01-20 22:28:38 -08:00
swig Update ruby binding build scripts 2014-06-20 07:39:23 +00:00
tests Merge branch 'fixing-warning' of cvvergara/geos into master 2018-01-20 22:28:38 -08:00
tools [CMake] No need to run cmake.exe in VS command prompt 2017-09-11 17:03:12 +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 Install a fake git2cl in gitlab-ci 2016-10-27 19:23:31 +00: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 my email address 2016-11-10 19:14:58 +00:00
CMakeLists.txt cmake: improving handling version 2018-01-10 09:32:43 +01:00
COPYING Fix FSF address in license file (#662) 2013-09-10 07:06:18 +00:00
HOWTO_RELEASE cmake: improving handling version 2018-01-10 09:32:43 +01:00
INSTALL Prepare for RC4 release. 2009-12-08 22:47:47 +00:00
Makefile.am Make trailing blanks check portable 2017-10-04 12:36:06 +02:00
NEWS Add note about USE_UNSTABLE_GEOS_CPP_API 2018-01-06 10:54:40 +01:00
README.md Clarify C++ API has not been deprecated 2017-10-01 18:59:07 +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 [AppVeyor] Fix build environment for VS2017 and NMAKE 2017-09-10 20:56:57 +02: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 Emit a warning at compile time about C++ API being unstable 2017-10-07 10:31:12 +02: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
master debbie winnie dronie travis gitlab-ci appveyor
svn-3.6 debbie winnie dronie travis gitlab-ci appveyor

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

Building, testing, installing

Unix

Using Autotools:

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

Using CMake:

cmake ${srcdir} # in build dir

Now, all versions:

make
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 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