• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

benchmarks/H03-May-2022-5,1584,202

capi/H03-May-2022-8,0366,607

cmake/H10-Feb-2021-123112

doc/H03-May-2022-6,7035,103

include/H03-May-2022-91,99052,308

macros/H10-Feb-2021-10,6549,474

src/H03-May-2022-102,86575,466

tests/H03-May-2022-84,33065,750

tools/H03-May-2022-22,46017,541

.editorconfigH A D03-Feb-2021765 4635

AUTHORSH A D21-Jan-20212.2 KiB5844

COPYINGH A D21-Jan-202125.9 KiB503418

ChangeLogH A D10-Feb-20211.9 MiB49,53938,940

INSTALLH A D10-Feb-20212.5 KiB9361

Makefile.amH A D10-Feb-20211.8 KiB7952

Makefile.inH A D10-Feb-202129.9 KiB972851

NEWSH A D10-Feb-202128.2 KiB732631

README.mdH A D10-Feb-20218 KiB12481

aclocal.m4H A D10-Feb-202142.9 KiB1,1811,073

acsite.m4H A D10-Feb-20211.5 KiB5649

compileH A D10-Feb-20217.2 KiB349259

config.guessH A D10-Feb-202147.8 KiB1,6881,475

config.subH A D10-Feb-202133.3 KiB1,8521,675

configureH A D10-Feb-2021662.1 KiB21,76418,495

configure.acH A D10-Feb-202113.4 KiB433380

depcompH A D10-Feb-202123 KiB792502

install-shH A D10-Feb-202115.3 KiB530346

ltmain.shH A D10-Feb-2021316.6 KiB11,1507,980

missingH A D10-Feb-20216.7 KiB216143

test-driverH A D10-Feb-20214.5 KiB14987

README.md

1GEOS -- Geometry Engine, Open Source
2====================================
3
4GEOS is a C++11 library for performing operations on two-dimensional vector
5geometries. It is primarily a port of the [JTS Topology
6Suite](https://github.com/locationtech/jts) Java library.  It provides many of
7the algorithms used by [PostGIS](http://www.postgis.net/), the
8[Shapely](https://pypi.org/project/Shapely/) package for Python, the
9[sf](https://github.com/r-spatial/sf) package for R, and others.
10
11More information is available the [project homepage](https://trac.osgeo.org/geos).
12
13## Build status
14
15| branch / CI | Debbie | Winnie | Dronie | Travis CI | GitLab CI | AppVeyor | GitHub | Bessie  | Bessie32 |
16|:---         |:---    |:---    |:---    |:---       |:---       |:---      |:---    |:---     |:---      |
17| master      | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Master)](https://debbie.postgis.net/view/GEOS/job/GEOS_Master/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Master/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Master/) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=master)](https://dronie.osgeo.org/geos/geos?branch=master) | [![travis](https://travis-ci.com/libgeos/geos.svg?branch=master)](https://travis-ci.com/libgeos/geos?branch=master) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/master/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/master) | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/master?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/master) | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=master)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) | [![bessie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie&BRANCH=master)](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) | [![bessie32](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie32&BRANCH=master)](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32)
18| 3.9     | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.9)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.9/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.9/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.9/) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=3.9)](https://dronie.osgeo.org/geos/geos?branch=3.9) | [![travis](https://travis-ci.com/libgeos/geos.svg?branch=3.9)](https://travis-ci.com/libgeos/geos?branch=3.9) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.9/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/3.9) | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/3.9?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/3.9) | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=3.9)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) |
19| 3.8     | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.8)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.8/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.8/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.8/) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=3.8)](https://dronie.osgeo.org/geos/geos?branch=3.8) | [![travis](https://travis-ci.com/libgeos/geos.svg?branch=3.8)](https://travis-ci.com/libgeos/geos?branch=3.8) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.8/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/3.8) | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/3.8?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/3.8) | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=3.8)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) |
20| 3.7     | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.7)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.7/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.7/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.7/) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?branch=3.7)](https://dronie.osgeo.org/geos/geos?branch=3.7) | [![travis](https://travis-ci.com/libgeos/geos.svg?branch=3.7)](https://travis-ci.com/libgeos/geos?branch=3.7) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.7/pipeline.svg)](https://gitlab.com/geos/libgeos/commits/3.7) | [![appveyor](https://ci.appveyor.com/api/projects/status/62aplwst722b89au/branch/3.7?svg=true)](https://ci.appveyor.com/project/dbaston/geos/branch/3.7) | [![github](https://github.com/libgeos/geos/workflows/CI/badge.svg?branch=3.7)](https://github.com/libgeos/geos/actions?query=workflow%3ACI) |
21
22
23## Build/install
24
25See INSTALL file
26
27## Client applications
28
29### Using the C interface
30
31GEOS promises long-term stability of the C API. In general, successive releases
32of the C API may add new functions but will not remove or change existing types
33or function signatures. The C library uses the C++ interface, but the C library
34follows normal ABI-change-sensitive versioning, so programs that link only
35against the C library should work without relinking when GEOS is upgraded. For
36this reason, it is recommended to use the C API for software that is intended
37to be dynamically linked to a system install of GEOS.
38
39The `geos-config` program can be used to determine appropriate compiler and
40linker flags for building against the C library:
41
42    CFLAGS += `geos-config --cflags`
43    LDFLAGS += `geos-config --ldflags` -lgeos_c
44
45All functionality of the C API is available through the `geos_c.h` header file.
46
47Documentation for the C API is provided via comments in the `geos_c.h` header
48file. C API usage examples can be found in the GEOS unit tests and in the
49source code of software that uses GEOS, such as PostGIS and the sf package
50for R.
51
52### Using the C++ interface
53
54The C++ interface to GEOS provides a more natural API for C++ programs, as well
55as additional functionality that has not been exposed in the C API.  However,
56developers who decide to use the C++ interface should be aware that GEOS does
57not promise API or ABI stability of the C++ API between releases.  Breaking
58changes in the C++ API/ABI are not typically announced or included in the NEWS
59file.
60
61The C++ library name will change on every minor release.
62
63The `geos-config` program can be used to determine appropriate compiler and
64linker flags for building against the C++ library:
65
66    CFLAGS += `geos-config --cflags`
67    LDFLAGS += `geos-config --ldflags` -lgeos
68
69A compiler warning may be issued when building against the C++ library. To
70remove the compiler warning, define `USE_UNSTABLE_GEOS_CPP_API` somewhere
71in the program.
72
73Commonly-used functionality of GEOS is available in the `geos.h` header file.
74Less-common functionality can be accessed by including headers for individual
75classes, e.g. `#include <geos/algorithm/distance/DiscreteHausdorffDistance.h>`.
76
77    #include <geos.h>
78
79Documentation for the C++ API is available at https://geos.osgeo.org/doxygen/,
80and basic C++ usage examples can be found in `doc/example.cpp`.
81
82
83### Scripting language bindings
84
85#### Ruby
86
87Ruby bindings are available via [RGeo](https://github.com/rgeo/rgeo).
88
89#### PHP
90
91PHP bindings for GEOS are available separately from
92[php-geos](https://git.osgeo.org/gitea/geos/php-geos).
93
94#### Python
95
96Python bindings are available via:
97
98 1. [Shapely](http://pypi.python.org/pypi/Shapely)
99 2. [PyGEOS](https://github.com/pygeos/pygeos)
100 3. Calling functions from `libgeos_c` via Python ctypes
101
102
103## Documentation
104
105Doxygen documentation can be generated using either the autotools or CMake build
106systems.
107
108### Using Autotools:
109
110    cd doc
111    make doxygen-html
112
113### Using CMake:
114
115    cmake -DBUILD_DOCUMENTATION=YES
116    make docs
117
118## Style
119
120To format your code into the desired style, use the astyle
121version included in source tree:
122
123    tools/astyle.sh <yourfile.cpp>
124