THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel Baston 3e0033915f Disable AzP MSVC C++20 build affected by compiler bug 1 week ago
benchmarks Improve Delaunay/Voronoi performance 4 weeks ago
capi Remove copy-paste error handling in CAPI 1 week ago
cmake Remove GIT_COMMIT_HASH entirely 6 months ago
debian Complete Note#1 in the http://wiki.osgeo.org/wiki/GEOS_Provenance_Review to get out of incubation. 7 years ago
doc Replace includes with concrete header files 1 month ago
examples/client Modernize CMake configuration 6 months ago
include Merge remote-tracking branch 'nilason/namespaces-header-files' 1 week ago
macros 'make check' passes with autoconf 2.63. 1 year ago
src Merge remote-tracking branch 'nilason/namespaces-header-files' 1 week ago
swig Applying patches for Closes #742 1 year ago
tests Merge remote-tracking branch 'nilason/namespaces-header-files' 1 week ago
tools Match cmake --ldflags output to autotools 1 month ago
.astylerc Apply 4-spaces standard indenting, 9 months ago
.azure-pipelines.yml Disable AzP MSVC C++20 build affected by compiler bug 1 week ago
.codecov.yml Disable coverage comments on PRs [ci skip] 5 months ago
.drone-1.0.yml [drone] Add valgrindcheck call to drone-ci 2 months ago
.editorconfig Modernize CMake configuration 6 months ago
.git-blame-ignore-revs Add reformatting commit to ignorable commits in blame 9 months ago
.gitignore Add benchmark test file InteriorPointAreaPerfTest 5 months ago
.gitlab-ci.yml [automake] Enable silent rule, use in Dronie and Gitlab-CI 6 months ago
.mailmap Add Paul van der Linden merge email 6 months ago
.travis.yml Add doxygen to Travis 2 months ago
AUTHORS Update Martin's email address 1 year ago
CMakeLists.txt Make inlining status message less opaque 1 month ago
COPYING Fix FSF address in license file (#662) 6 years ago
HOWTO_RELEASE Add in CMake artifacts necessary to build/check in the 1 month ago
INSTALL Move build section from README.md to INSTALL 2 months ago
Makefile.am Add in CMake artifacts necessary to build/check in the 1 month ago
NEWS News entry 1 month ago
README.md Show 3.8 branch badges in README.md 1 month ago
Version.txt Bump versions for master development to 3.9 1 month ago
acsite.m4 git-svn-id: http://svn.osgeo.org/geos/trunk@3855 5242fede-7e19-0410-aef8-94bd7d2200fb 6 years ago
appveyor.yml Try to get clean appveyor build 6 months ago
autogen.sh Stop symlinking README.md as README 3 years ago
configure.ac Add Doxygen "docs" target to CMake build 2 months ago

README.md

GEOS -- Geometry Engine, Open Source

GEOS is a C++11 library for performing operations on two-dimensional vector geometries. It is primarily a port of the JTS Topology Suite Java library. It provides many of the algorithms used by PostGIS, the Shapely package for Python, the sf package for R, and others.

More information is available the project homepage.

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.8 debbie winnie dronie travis gitlab-ci appveyor
3.7 debbie winnie dronie travis gitlab-ci appveyor

Build/install

See INSTALL file

Client applications

Using the C interface

GEOS promises long-term stability of the C API. In general, successive releases of the C API may add new functions but will not remove or change existing types or function signatures. 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. For this reason, it is recommended to use the C API for software that is intended to be dynamically linked to a system install of GEOS.

The geos-config program can be used to determine appropriate compiler and linker flags for building against the C library:

CFLAGS += `geos-config --cflags`
LDFLAGS += `geos-config --ldflags` -lgeos_c

All functionality of the C API is available through the geos_c.h header file.

Documentation for the C API is provided via comments in the geos_c.h header file. C API usage examples can be found in the GEOS unit tests and in the source code of software that uses GEOS, such as PostGIS and the sf package for R.

Using the C++ interface

The C++ interface to GEOS provides a more natural API for C++ programs, as well as additional functionality that has not been exposed in the C API. However, developers who decide to use the C++ interface should be aware that GEOS does not promise API or ABI stability of the C++ API between releases. Breaking changes in the C++ API/ABI are not typically announced or included in the NEWS file.

The C++ library name will change on every minor release.

The geos-config program can be used to determine appropriate compiler and linker flags for building against the C++ library:

CFLAGS += `geos-config --cflags`
LDFLAGS += `geos-config --ldflags` -lgeos

A compiler warning may be issued when building against the C++ library. To remove the compiler warning, define USE_UNSTABLE_GEOS_CPP_API somewhere in the program.

Commonly-used functionality of GEOS is available in the geos.h header file. Less-common functionality can be accessed by including headers for individual classes, e.g. #include <geos/algorithm/distance/DiscreteHausdorffDistance.h>.

#include <geos.h>

Documentation for the C++ API is available at https://geos.osgeo.org/doxygen/, and basic C++ usage examples can be found in doc/example.cpp.

Scripting language bindings

Ruby

Ruby bindings are part of GEOS. To build, use the --enable-ruby option when configuring:

./configure .. --enable-ruby

PHP

PHP bindings for GEOS are available separately from php-geos.

Python

Python bindings are available via:

  1. Shapely package.
  2. Calling functions from libgeos_c via Python ctypes.

Documentation

Doxygen documentation can be generated using either the autotools or CMake build systems.

Using Autotools:

cd doc
make doxygen-html

Using CMake:

cmake -DBUILD_DOCUMENTATION=YES
make docs

Style

To format your code into the desired style, use the astyle version included in source tree:

tools/astyle.sh <yourfile.cpp>