Geometry Engine, Open Source [MIRROR]
C++ Ruby M4 Makefile Python CMake Other
Latest commit 230f915 Nov 24, 2017 @strk strk committed with Gogs Merge branch 'ml/846' of mloskot/geos into master
Permalink
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 http://wiki.osgeo.org/wiki/GEOS_Provenance_Review Jan 16, 2012
doc Use GeometryFactory::Ptr instead of old unique_ptr alias Sep 7, 2017
include Remove BOM mark Nov 24, 2017
macros Set C++11 as required standard Sep 7, 2017
src Remove BOM mark Nov 24, 2017
swig Update ruby binding build scripts Jun 20, 2014
tests Emit a warning at compile time about C++ API being unstable Oct 7, 2017
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] Remove checks for prehistoric versions of Visual Studio Sep 11, 2017
COPYING Fix FSF address in license file (#662) Sep 10, 2013
HOWTO_RELEASE Indexed steps, configure.ac name fix Jul 25, 2017
INSTALL Prepare for RC4 release. Dec 8, 2009
Makefile.am Make trailing blanks check portable Oct 4, 2017
NEWS Add interruptible snap news item Sep 14, 2017
README.md Clarify C++ API has not been deprecated Oct 1, 2017
TODO Triangulation API was ported Apr 8, 2017
acsite.m4 git-svn-id: http://svn.osgeo.org/geos/trunk@3855 5242fede-7e19-0410-a… Jul 31, 2013
appveyor.yml [AppVeyor] Fix build environment for VS2017 and NMAKE Sep 10, 2017
authors.svn Fix my email address Sep 2, 2016
autogen.bat [CMake] Simplify generation of geos_revision.h Apr 7, 2017
autogen.sh Stop symlinking README.md as README Oct 27, 2016
configure.ac Emit a warning at compile time about C++ API being unstable Oct 7, 2017
makefile.vc 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

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

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:

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