Name: geos
Owner: Open Source Geospatial Foundation
Description: Geometry Engine, Open Source [MIRROR]
Created: 2011-10-26 14:36:13.0
Updated: 2018-01-07 08:09:04.0
Pushed: 2018-01-14 10:14:11.0
Homepage: http://geos.osgeo.org
Size: 17318
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Project homepage: http://geos.osgeo.org/
| branch / CI | Debbie | Winnie | Dronie | Travis CI | GitLab CI | AppVeyor | |:— |:— |:— |:— |:— |:— |:— | | master | | | | | | | | svn-3.6 | | | | | | |
More on: https://trac.osgeo.org/geos#BuildandInstall
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
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
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.
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
.
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:
libgeos_c
via Python ctypes.To build Doxygen documentation:
cd doc
make doxygen-html