Skip to content

beixuewei/geos

This branch is 2852 commits behind libgeos/geos:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

81ff4c0 · Nov 20, 2018
Oct 27, 2018
Nov 26, 2014
Jan 16, 2012
Jun 14, 2018
Nov 19, 2018
Oct 2, 2018
Nov 20, 2018
Jun 14, 2018
Nov 19, 2018
Oct 21, 2018
Oct 28, 2016
Jul 14, 2017
Oct 21, 2018
Jun 13, 2018
Sep 9, 2017
Nov 29, 2010
Aug 1, 2018
Aug 29, 2018
Sep 10, 2013
Aug 25, 2018
Dec 8, 2009
Aug 27, 2018
Aug 19, 2018
Oct 19, 2018
Apr 8, 2017
Jul 31, 2013
Aug 31, 2018
Apr 7, 2017
Oct 27, 2016
Oct 2, 2018
Sep 23, 2011
Oct 11, 2017

Repository files navigation

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

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.

Documentation

To build Doxygen documentation:

cd doc
make doxygen-html

About

Geometry Engine, Open Source [MIRROR]

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 92.2%
  • Ruby 2.4%
  • M4 1.6%
  • Makefile 1.1%
  • Python 0.8%
  • CMake 0.8%
  • Other 1.1%