Skip to content
Commits on Source (59)
# http://editorconfig.org
# top-most EditorConfig file
root = true
# every file needs these
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
# C++ files want tab indentation
[*.{h,cpp}]
indent_style = tab
indent_size = 2
# Makefiles want tab indentation
[Makefile.am]
indent_style = tab
indent_size = 2
# YML files want space indentation
[*.yml]
indent_style = space
indent_size = 2
# appveyor.yml is meant for windows (mloskot said)
[appveyor.yml]
end_of_line = crlf
# Visual-C files want carriage returns too
[*.{vc,opt}]
end_of_line = crlf
# CMake configuration files
[CMakeLists.txt]
indent_style = space
indent_size = 2
# CMake modules
[*.cmake]
indent_style = space
indent_size = 2
# operation/union directories were found to be using spaces
[src/operation/union/*.cpp]
indent_style = space
indent_size = 2
[include/geos/operation/union/*.{h,inl}]
indent_style = space
indent_size = 2
# XMLTester.cpp wants 2-space indent
[tests/xmltester/XMLTester.cpp]
indent_style = space
indent_size = 4
# Stackwalker.cpp wants 4-space indent
[tests/xmltester/Stackwalker.cpp]
indent_style = space
indent_size = 2
2006-Present
GEOS is a project of the OSGEO foundation and is continually improved
and funded by mandy FOSS4G developers as well as corporations all
over the world.
Developers and Project Steering Committee (PSC):
Active:
Martin Davis (mtnclimb at gmail.com )(PSC) - Architecture
Sandro Santilli (strk@kbt.io) (PSC Chair) - Bug Fixing / Maintenance
Paul Ramsey (pramsey@cleverelephant.ca) (PSC) - Coordination / Build
Regina Obe (lr@pcorp.us) (PSC) - QA / Windows / Coordination
Howard Butler (howard@hobu.co) (PSC) - OS Platform support and testing
Dale Lutz (dale.lutz@safe.com) (PSC)
Daniel Baston (dbaston@gmail.com) - Bug Fixing / New functionality
Kurt Schwehr ( schwehr@gmail.com ) - Bug Fixing / Test hardening
Vicky Vergara (vicky@georepublic.de) - Refactor / Test development
Not Active:
Mateusz Loskot (mateusz@loskot.net) - Unit testing
Frank Warmerdam (warmerdam@pobox.com) - VStudio porting
Dave Blasby (dblasby@gmail.com) - PostGIS Connectivity
Yury Bychkov (me@yury.ca) - Initial Porting
Sean Gillies (sgillies@frii.com) - Scripting Interface
Fernando Villa (fvilla@zoo.uvm.edu) - GNU Build System
Norman Vine (nvine@cape.com) - Porting / C++ Expertise
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-06
......@@ -29,19 +55,3 @@ by the Bavarian State Ministry of Agriculture and Forestry and the
State Survey of Bavaria.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Developers:
Active:
Martin Davis (mbdavis@refractions.net) - Architecture
Mateusz Loskot (mateusz@loskot.net) - Unit testing
Regina Obe (lr@pcorp.us) - QA / Windows
Paul Ramsey (pramsey@refractions.net) - Coordination / Build
Sandro Santilli (strk@keybit.net) - Bug Fixing / Maintenance
Frank Warmerdam (warmerdam@pobox.com) - VStudio porting
In Active:
Dave Blasby (dblasby@gmail.com) - PostGIS Connectivity
Yury Bychkov (me@yury.ca) - Initial Porting
Sean Gillies (sgillies@frii.com) - Scripting Interface
Fernando Villa (fvilla@zoo.uvm.edu) - GNU Build System
Norman Vine (nvine@cape.com) - Porting / C++ Expertise
......@@ -10,16 +10,32 @@
# See the COPYING file for more information.
#
#################################################################################
project(GEOS)
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.1.3)
if(NOT CMAKE_VERSION)
set(CMAKE_VERSION
"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
endif()
# Location of custom CMake modules with macros used by GEOS
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
#################################################################################
# Set GEOS project
#################################################################################
project(GEOS VERSION 3.7.0 LANGUAGES C CXX)
# Add custom GEOS modules for CMake
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
#################################################################################
# Set C++ standard
#################################################################################
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS "Setting C++ requirement to C++${CMAKE_CXX_STANDARD}")
#################################################################################
# Setup GEOS version
......@@ -27,19 +43,23 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
# GEOS release version
# GEOS C++ library SONAME will use these encoding ABI break at every release
set(VERSION_MAJOR 3)
set(VERSION_MINOR 6)
set(VERSION_PATCH 2)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(GEOS_VERSION "${GEOS_VERSION_MAJOR}.${GEOS_VERSION_MINOR}.${GEOS_VERSION_PATCH}")
set(VERSION "${GEOS_VERSION}")
# Copy version components into different variable names to match those used
# by autotools for *.h.in files
set(VERSION_MAJOR ${GEOS_VERSION_MAJOR})
set(VERSION_MINOR ${GEOS_VERSION_MINOR})
set(VERSION_PATCH ${GEOS_VERSION_PATCH})
# JTS_PORT is the version of JTS this release is bound to
set(JTS_PORT 1.13.0)
message(STATUS "Setting GEOS version ${VERSION} as port of JTS ${JTS_PORT}")
# GEOS C API version
set(CAPI_INTERFACE_CURRENT 11)
set(CAPI_INTERFACE_REVISION 2)
set(CAPI_INTERFACE_AGE 10)
set(CAPI_INTERFACE_CURRENT 12)
set(CAPI_INTERFACE_REVISION 0)
set(CAPI_INTERFACE_AGE 11)
math(EXPR CAPI_VERSION_MAJOR "${CAPI_INTERFACE_CURRENT} - ${CAPI_INTERFACE_AGE}")
set(CAPI_VERSION_MINOR ${CAPI_INTERFACE_AGE})
......@@ -55,9 +75,6 @@ endif()
# Check custom global options
#################################################################################
option(GEOS_ENABLE_TESTS
"Set to OFF|ON (default) to control build of GEOS tests package" ON)
option(GEOS_ENABLE_INLINE
"Set to OFF|ON (default) to control GEOS compilation with small functions inlining" ON)
......@@ -66,6 +83,12 @@ if(NOT MSVC)
"Set to ON|OFF (default) to build GEOS with assert() macro enabled" OFF)
endif()
option(GEOS_ENABLE_TESTS
"Set to OFF|ON (default) to control build of GEOS tests package" ON)
option(GEOS_ENABLE_TESTS_UNIT2_ONLY
"Set to ON|OFF (default) to enable only new tests based on Catch (WIP: experimental)." OFF)
option(GEOS_BUILD_STATIC
"Set to OFF|ON (default) to build GEOS static libraries" ON)
......@@ -87,9 +110,6 @@ endif()
#################################################################################
# Setup C/C++ compiler options
#################################################################################
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT MSVC_IDE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING
......@@ -102,10 +122,12 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-D_DEBUG)
endif()
add_definitions(-DUSE_UNSTABLE_GEOS_CPP_API)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
# General options
set(CMAKE_CXX_FLAGS "-pedantic -ansi ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "-pedantic -ansi ${CMAKE_C_FLAGS}")
# Numerical stability
if(GEOS_ENABLE_FLOATSTORE)
......@@ -116,10 +138,10 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
"Forcing IEEE 754 using flag -ffloat-store - ${GEOS_ENABLE_FLOATSTORE}")
# Warnings specification
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -fno-implicit-inline-templates -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
# Turn on Position Independent Code generation for GEOS C shared library
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wconversion -pedantic -Wmissing-prototypes -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
# Enable glibc ISO C99 features (macros isfinite, isnan)
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_ISOC99_SOURCE=1")
......@@ -130,16 +152,8 @@ elseif(MSVC)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
string(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
if(NOT (MSVC_VERSION LESS 1400)) # Visual Studio 2005 or later
# Option is to enable the /MP switch for Visual Studio 2005 or later
option(GEOS_MSVC_ENABLE_MP
"Set to ON to build GEOS with the /MP option (Visual Studio 2005 and above)." ON)
mark_as_advanced(GEOS_MSVC_ENABLE_MP)
if(GEOS_MSVC_ENABLE_MP)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
message(STATUS "Setting Visual Studio 2005+ option /MP to ${GEOS_MSVC_ENABLE_MP}")
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
......@@ -249,62 +263,27 @@ include_directories(${PROJECT_BINARY_DIR})
#################################################################################
# Setup checks and generate config headers
#################################################################################
#################################################################################
# MACRO: GET_SVN_REVISION
#
# DESCRIPTION:
# MACRO FOR GETTING THE SVN revision for this build
#################################################################################
MACRO (GET_SVN_REVISION)
FIND_PACKAGE(Subversion)
IF(SUBVERSION_FOUND)
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
# MESSAGE("Current revision is ${Project_WC_REVISION}")
# Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
# MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
ENDIF()
ENDMACRO(GET_SVN_REVISION)
# Determine SVN/Git revision
# Determine SVN/Git revision
if(EXISTS "${PROJECT_SOURCE_DIR}/.svn")
GET_SVN_REVISION()
endif()
# geos_revision.h does not exists in source or binary directory, we generate it
if( NOT EXISTS "${PROJECT_SOURCE_DIR}/geos_revision.h" AND
NOT EXISTS "${PROJECT_BINARY_DIR}/geos_revision.h")
message(STATUS "Generating GEOS revision header in ${PROJECT_BINARY_DIR}/geos_revision.h")
# CI builds (Travis CI, AppVeyor, etc.) perform git clone, not svn checkout.
# So, CI environment needs a dummy revision to generate the required header.
if (DEFINED ENV{CI})
set(Project_WC_REVISION 999999)
endif()
if ( NOT ${Project_WC_REVISION} EQUAL 0 )
set( GEOS_REVISION ${Project_WC_REVISION} )
configure_file (
"${PROJECT_SOURCE_DIR}/tools/geos_revision_cmake.h.in"
"${PROJECT_BINARY_DIR}/geos_revision.h" )
else()
find_program(SH sh)
if(SH)
execute_process(COMMAND ${SH} -c
"cd ${PROJECT_SOURCE_DIR} && ${PROJECT_SOURCE_DIR}/tools/repo_revision.sh")
file(RENAME "${PROJECT_SOURCE_DIR}/geos_revision.h"
"${PROJECT_BINARY_DIR}/geos_revision.h")
else()
message("*** sh-compatible command not found, cannot create geos_revision.h")
message("*** Check SVN revision and create revision header manually:")
message("*** echo '#define GEOS_REVISION XYZ' > ${PROJECT_SOURCE_DIR}/geos_revision.h")
endif()
endif()
endif()
# End: Determine SVN/Git revision
find_package(Git)
message(STATUS "Generating GEOS ${PROJECT_BINARY_DIR}/geos_revision.h")
file(WRITE ${CMAKE_BINARY_DIR}/geos_revision.h.in "\#define GEOS_REVISION \"@GEOS_REVISION@\"\n")
file(WRITE ${CMAKE_BINARY_DIR}/geos_revision.cmake
"
execute_process(COMMAND \${GIT} describe --tags --always
WORKING_DIRECTORY \${CWD}
OUTPUT_VARIABLE GEOS_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
configure_file(\${SRC} \${DST} @ONLY)
")
add_custom_target(geos_revision
COMMAND ${CMAKE_COMMAND}
-D CWD=${CMAKE_CURRENT_SOURCE_DIR}
-D GIT=${GIT_EXECUTABLE}
-D SRC=${PROJECT_BINARY_DIR}/geos_revision.h.in
-D DST=${PROJECT_BINARY_DIR}/geos_revision.h
-P ${PROJECT_BINARY_DIR}/geos_revision.cmake)
if(EXISTS ${PROJECT_SOURCE_DIR}/include/geos/platform.h)
message(STATUS "Disabling existing ${PROJECT_SOURCE_DIR}/include/geos/platform.h")
......@@ -338,17 +317,31 @@ configure_file(${PROJECT_SOURCE_DIR}/capi/geos_c.h.in
# Configure tests
#################################################################################
if(GEOS_ENABLE_TESTS)
if(GEOS_ENABLE_TESTS OR GEOS_ENABLE_TESTS_UNIT2_ONLY)
enable_testing()
# Define "make check" as alias for "make test"
add_custom_target(check COMMAND ctest)
endif()
#################################################################################
# Configure subdirectories
# IDE specifics
#################################################################################
if (MSVC_IDE)
# Visual Studio 2017 supports .editorconfig, copy it next to generated .sln
message(STATUS "Copying .editorconfig file to ${PROJECT_BINARY_DIR}")
file(COPY "${PROJECT_SOURCE_DIR}/.editorconfig"
DESTINATION "${PROJECT_BINARY_DIR}")
endif()
include(GenerateSourceGroups)
# Enable target debugging for CMake Tools in Visual Studio Code
# https://github.com/vector-of-bool/vscode-cmake-tools
include(CMakeToolsHelpers OPTIONAL)
#################################################################################
# Configure subdirectories
#################################################################################
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(capi)
......
This diff is collapsed.
......@@ -24,10 +24,12 @@ SUBDIRS = \
BUILT_SOURCES = geos_revision.h
EXTRA_DIST = acsite.m4 makefile.vc nmake.opt autogen.bat CMakeLists.txt \
EXTRA_DIST = acsite.m4 .editorconfig makefile.vc nmake.opt autogen.bat CMakeLists.txt \
cmake/modules/CheckPrototypeExists.cmake \
cmake/modules/COPYING-CMAKE-SCRIPTS \
cmake/cmake_uninstall.cmake.in geos_revision.h
cmake/modules/GenerateSourceGroups.cmake \
cmake/cmake_uninstall.cmake.in geos_revision.h \
README.md
ACLOCAL_AMFLAGS = -I macros
......@@ -37,14 +39,11 @@ gen-ChangeLog:
cd $(distdir) && owd=`pwd` && \
cd ../ && cd $(srcdir) && \
if test -d .git; then \
git2cl > $${owd}/ChangeLog; \
git log --pretty --numstat --summary | git2cl > $${owd}/ChangeLog; \
elif test -d .svn; then \
svn2cl --authors=authors.svn -i -o $${owd}/ChangeLog; \
elif test -f ChangeLog; then \
echo "NOTE: distributing ChangeLog found in source dir"; \
cp ChangeLog $${owd}/ChangeLog; \
else \
echo "WARNING: could not find a ChangeLog" >&2; \
fi
apidoc doxygen:
......@@ -65,3 +64,8 @@ valgrindcheck:
$(VALGRIND) tests/unit/geos_unit
.PHONY: geos_revision.h
check-local:
! find . -name '*.cpp' -o -name '*.h' | \
grep -v tests/xmltester/tinyxml | \
xargs grep -n '[[:space:]]$$'
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -102,6 +102,9 @@ subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/ac_pkg_swig.m4 \
$(top_srcdir)/macros/ac_python_devel.m4 \
$(top_srcdir)/macros/ax_check_compile_flag.m4 \
$(top_srcdir)/macros/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/macros/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/macros/libtool.m4 \
$(top_srcdir)/macros/ltoptions.m4 \
$(top_srcdir)/macros/ltsugar.m4 \
......@@ -154,7 +157,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
......@@ -177,8 +180,8 @@ CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING INSTALL NEWS \
README TODO compile config.guess config.sub install-sh \
ltmain.sh missing py-compile
TODO compile config.guess config.sub install-sh ltmain.sh \
missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......@@ -262,6 +265,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HAVE_CXX11 = @HAVE_CXX11@
INLINE_FLAGS = @INLINE_FLAGS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
......@@ -310,6 +314,8 @@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RUBY = @RUBY@
RUBY_ARCH_INCLUDE_DIR = @RUBY_ARCH_INCLUDE_DIR@
RUBY_ARCH_LIB_DIR = @RUBY_ARCH_LIB_DIR@
RUBY_BIN_DIR = @RUBY_BIN_DIR@
RUBY_EXTENSION_DIR = @RUBY_EXTENSION_DIR@
RUBY_INCLUDE_DIR = @RUBY_INCLUDE_DIR@
......@@ -330,6 +336,7 @@ VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION_PATCH = @VERSION_PATCH@
VERSION_RELEASE = @VERSION_RELEASE@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
......@@ -407,10 +414,12 @@ SUBDIRS = \
tools
BUILT_SOURCES = geos_revision.h
EXTRA_DIST = acsite.m4 makefile.vc nmake.opt autogen.bat CMakeLists.txt \
EXTRA_DIST = acsite.m4 .editorconfig makefile.vc nmake.opt autogen.bat CMakeLists.txt \
cmake/modules/CheckPrototypeExists.cmake \
cmake/modules/COPYING-CMAKE-SCRIPTS \
cmake/cmake_uninstall.cmake.in geos_revision.h
cmake/modules/GenerateSourceGroups.cmake \
cmake/cmake_uninstall.cmake.in geos_revision.h \
README.md
ACLOCAL_AMFLAGS = -I macros
VALGRIND = $(LIBTOOL) --mode=execute valgrind --leak-check=full --error-exitcode=1
......@@ -439,8 +448,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
......@@ -567,7 +576,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
......@@ -635,7 +647,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
......@@ -661,7 +673,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
......@@ -679,7 +691,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
......@@ -689,7 +701,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
......@@ -759,6 +771,7 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile
......@@ -866,15 +879,15 @@ ps-am:
uninstall-am:
.MAKE: $(am__recursive_targets) all check install install-am \
.MAKE: $(am__recursive_targets) all check check-am install install-am \
install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-generic distclean-libtool distclean-tags \
am--refresh check check-am check-local clean clean-cscope \
clean-generic clean-libtool cscope cscopelist-am ctags \
ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \
dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
distclean distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
......@@ -895,14 +908,11 @@ gen-ChangeLog:
cd $(distdir) && owd=`pwd` && \
cd ../ && cd $(srcdir) && \
if test -d .git; then \
git2cl > $${owd}/ChangeLog; \
git log --pretty --numstat --summary | git2cl > $${owd}/ChangeLog; \
elif test -d .svn; then \
svn2cl --authors=authors.svn -i -o $${owd}/ChangeLog; \
elif test -f ChangeLog; then \
echo "NOTE: distributing ChangeLog found in source dir"; \
cp ChangeLog $${owd}/ChangeLog; \
else \
echo "WARNING: could not find a ChangeLog" >&2; \
fi
apidoc doxygen:
......@@ -922,6 +932,11 @@ valgrindcheck:
.PHONY: geos_revision.h
check-local:
! find . -name '*.cpp' -o -name '*.h' | \
grep -v tests/xmltester/tinyxml | \
xargs grep -n '[[:space:]]$$'
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Changes in 3.6.2
2017-07-25
3.7.0 changes
2018-09-10
- New things:
- CAPI: GEOSDistanceIndexed (#795, Dan Baston)
- CAPI: GEOSCoordSeq_isCCW (#870, Dan Baston)
- CAPI: GEOSGeom_getXMin, GEOSGeom_getXMax,
GEOSGeom_getYMin, GEOSGeom_getYMax (#871, Dan Baston)
- CAPI: GEOSFrechetDistance (#797, Shinichi SUGIYAMA)
- CAPI: GEOSReverse (#872, Dan Baston)
- CAPI: GEOSGeomGetZ (#581, J Smith)
- Improvements
- Interruptible snap operation (Paul Ramsey)
- Numerous packaging, doc, and build changes
(Debian group: Bas Couwenberg, Francesco Paolo Lovergine)
(NetBSD: Greg Troxel)
- Allow static library with C API for CMake builds (#878, Dakota Hawkins)
- Bug fixes / improvements
- Fix exception in UnaryUnion of collection of touching polygons (#837)
- Allow building against python 3 (#774)
- Fix build with android-ndk and other compilers (#799)
- Allows compiling with -Wpointer-bool-conversion (#638)
- Fix unhandled exception on invalid fp operation (#811)
- Fix overloaded virtual print in DirectedEdge* (#812)
- AppVeyor CI build added (#813)
- Clean up numerous MSVC warnings, notably C4275 and C4589 (#814)
- Bump CMake version to 3.0.0 (#817)
- Fix leaks in WKT parser (#830)
- C++ API changes:
- Require defining USE_UNSTABLE_GEOS_CPP_API for use without
warnings.
- Make C++11 required (Mateusz Loskot)
- Use C++11 unique_ptr, nullptr, and override constructs
(Mateusz Loskot)
- C++11 standard delete on noncopyable
(#851, Vicky Vergara)
- Fix CommonBits::getBit to correctly handle i >= 32
(#834, Kurt Schwehr)
Changes in 3.7.0rc2
2018-09-03
Fixes / enhancements since 3.7.0rc1
- Drop ? from extended regular expression,
so that the expression strictly conforms to the POSIX ERE rules.
(#917, Greg Troxel, Bas Couwenberg)
- include .editorconfig in tar ball,
fixes Cmake on VS (#920, Jeff Mckenna, Regina Obe)
- Ignore error in CoordinateArraySequenceFactoryTest
failing on FreeBSD/macOS Clang (#894)
Changes in 3.7.0rc1
2018-08-19
Fixes / enhancements since 3.7.0beta2
- Avoid segfault when querying empty tree (#730, framm)
- Collection with Empty components crashes overlay (#782, Dan Baston)
- Allow static library with C API for CMake builds (#878, Dakota Hawkins)
Changes in 3.7.0beta2
2018-08-06
Fixes since 3.7.0beta1
- Fix infinite loop in GEOSClipByRect (#865, Dan Baston)
- Make GEOSException inherit from std::runtime_error
to address clang warnings (Dan Baston)
- Add missing CMake files to tarball (#895, Regina Obe)
Changes in 3.7.0beta1
2018-06-25
See 3.7.0 latest notes
Changes in 3.7.0alpha
2018-06-14
See 3.7.0 notes
Changes in 3.6.1
2016-12-24
......@@ -224,7 +274,7 @@ Changes in 3.3.1
- Fix memory leak on invalid geometry in InteriorPointArea (#475)
- ValidOp abort in presence of 2 touching holes forming an island (#449)
- Enable prepared intersects operation for points
- Fortify suspicious code found by static analisys tools
- Fortify suspicious code found by static analysis tools
- Fix for SOLARIS build (#461)
- Fix EMPTY result from GEOSOffsetCurve with distance 0 (#454)
- Fix Geometry::clone to copy SRID (#464)
......
......@@ -5,10 +5,10 @@ Project homepage: http://geos.osgeo.org/
## Build status
| branch / CI | Debbie | Winnie | Dronie | Travis CI | GitLab CI | AppVeyor |
|:--- |:--- |:--- |:--- |:--- |:--- |:--- |
| svn-trunk | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Trunk)](https://debbie.postgis.net/view/GEOS/job/GEOS_Trunk/) | [![winnie](https://debbie.postgis.net:444/view/GEOS/job/GEOS_matrix_trunk/badge/icon)](https://debbie.postgis.net:444/view/GEOS/job/GEOS_matrix_trunk/) | [![dronie](https://drone.osgeo.org/api/badges/geos/geos/status.svg?branch=svn-trunk)](https://drone.osgeo.org/geos/geos?branch=svn-trunk) | [![travis](https://travis-ci.org/OSGeo/geos.svg?branch=svn-trunk)](https://travis-ci.org/OSGeo/geos?branch=svn-trunk) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/svn-trunk/build.svg)](https://gitlab.com/geos/libgeos/commits/svn-trunk) | [![appveyor](https://ci.appveyor.com/api/projects/status/ao909hwpsb1yu062/branch/svn-trunk?svg=true)](https://ci.appveyor.com/project/OSGeo/geos/branch/svn-trunk) |
| svn-3.6 | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.6)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.6/) | [![winnie](https://debbie.postgis.net:444/view/GEOS/job/GEOS_matrix_branch_3.6/badge/icon)](https://debbie.postgis.net:444/view/GEOS/job/GEOS_matrix_branch_3.6/) | [![dronie](https://drone.osgeo.org/api/badges/geos/geos/status.svg?branch=svn-3.6)](https://drone.osgeo.org/geos/geos?branch=svn-3.6) | [![travis](https://travis-ci.org/OSGeo/geos.svg?branch=svn-3.6)](https://travis-ci.org/OSGeo/geos?branch=svn-3.6) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/svn-3.6/build.svg)](https://gitlab.com/geos/libgeos/commits/svn-3.6) | [![appveyor](https://ci.appveyor.com/api/projects/status/ao909hwpsb1yu062/branch/svn-3.6?svg=true)](https://ci.appveyor.com/project/OSGeo/geos/branch/svn-3.6) |
| branch / CI | Debbie | Winnie | Dronie | Travis CI | GitLab CI | AppVeyor | Bessie | Bessie32 |
|:--- |:--- |:--- |:--- |:--- |:--- |:--- |:--- |:--- |
| 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://drone.osgeo.org/api/badges/geos/geos/status.svg?branch=master)](https://drone.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/build.svg)](https://gitlab.com/geos/libgeos/commits/master) | [![appveyor](https://ci.appveyor.com/api/projects/status/ao909hwpsb1yu062/branch/master?svg=true)](https://ci.appveyor.com/project/OSGeo/geos/branch/master) | [![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) ||
| svn-3.6 | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.6)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.6/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.6/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.6/) | [![dronie](https://drone.osgeo.org/api/badges/geos/geos/status.svg?branch=svn-3.6)](https://drone.osgeo.org/geos/geos?branch=svn-3.6) | [![travis](https://travis-ci.com/libgeos/geos.svg?branch=svn-3.6)](https://travis-ci.com/libgeos/geos?branch=svn-3.6) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/svn-3.6/build.svg)](https://gitlab.com/geos/libgeos/commits/svn-3.6) | [![appveyor](https://ci.appveyor.com/api/projects/status/ao909hwpsb1yu062/branch/svn-3.6?svg=true)](https://ci.appveyor.com/project/OSGeo/geos/branch/svn-3.6) |
More on: https://trac.osgeo.org/geos#BuildandInstall
......@@ -58,6 +58,12 @@ is required:
### 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`
......@@ -68,16 +74,15 @@ Example usage:
capi/geostest.c contains basic usage examples.
### Using the C++ interface (discouraged)
### 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
NB: The C++ interface should not be used directly; the GEOS project
views it as a bug for another program to use the C++ interface or even
to directly link against the C++ library. The C++ library name will
change on every minor release because it is too hard to know if there
have been ABI changes. (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.)
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:
......
# generated automatically by aclocal 1.15 -*- Autoconf -*-
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.15], [],
m4_if([$1], [1.16.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.15])dnl
[AM_AUTOMAKE_VERSION([1.16.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -332,13 +332,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
......@@ -346,49 +345,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
# TODO: see whether this extra hack can be removed once we start
# requiring Autoconf 2.70 or later.
AS_CASE([$CONFIG_FILES],
[*\'*], [eval set x "$CONFIG_FILES"],
[*], [set x $CONFIG_FILES])
shift
for mf
# Used to flag and report bootstrapping failures.
am_rc=0
for am_mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named 'Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile which includes
# dependency-tracking related rules and includes.
# Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running 'make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
|| continue
am_dirpart=`AS_DIRNAME(["$am_mf"])`
am_filepart=`AS_BASENAME(["$am_mf"])`
AM_RUN_LOG([cd "$am_dirpart" \
&& sed -e '/# am--include-marker/d' "$am_filepart" \
| $MAKE -f - am--depfiles]) || am_rc=$?
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
AS_UNSET([am_dirpart])
AS_UNSET([am_filepart])
AS_UNSET([am_mf])
AS_UNSET([am_rc])
rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
......@@ -397,18 +388,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each '.P' file that we will
# need in order to bootstrap the dependency handling code.
# This code is only required when automatic dependency tracking is enabled.
# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
[AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -495,8 +485,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
......@@ -563,7 +553,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
......@@ -605,7 +595,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -626,7 +616,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -648,7 +638,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -683,7 +673,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -691,49 +681,42 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
# Check whether make has an 'include' directive that can support all
# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
cat > confinc.mk << 'END'
am__doit:
@echo this is the am__doit target
@echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
# BSD make does it like this.
echo '.include "confinc.mk" # ignored' > confmf.BSD
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
echo 'include confinc.mk # ignored' > confmf.GNU
_am_result=no
for s in GNU BSD; do
AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
AS_CASE([$?:`cat confinc.out 2>/dev/null`],
['0:this is the am__doit target'],
[AS_CASE([$s],
[BSD], [am__include='.include' am__quote='"'],
[am__include='include' am__quote=''])])
if test "$am__include" != "#"; then
_am_result="yes ($s style)"
break
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
done
rm -f confinc.* confmf.*
AC_MSG_RESULT([${_am_result}])
AC_SUBST([am__include])])
AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -772,7 +755,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -801,7 +784,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -848,7 +831,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -867,7 +850,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -948,7 +931,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1008,7 +991,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1036,7 +1019,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1055,7 +1038,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1188,6 +1171,9 @@ AC_SUBST([am__untar])
m4_include([macros/ac_pkg_swig.m4])
m4_include([macros/ac_python_devel.m4])
m4_include([macros/ax_check_compile_flag.m4])
m4_include([macros/ax_cxx_compile_stdcxx.m4])
m4_include([macros/ax_cxx_compile_stdcxx_11.m4])
m4_include([macros/libtool.m4])
m4_include([macros/ltoptions.m4])
m4_include([macros/ltsugar.m4])
......
......@@ -14,4 +14,5 @@ set GEOS_HEADERS=include\geos
COPY %GEOS_HEADERS%\version.h.vc %GEOS_HEADERS%\version.h
COPY %GEOS_HEADERS%\platform.h.vc %GEOS_HEADERS%\platform.h
COPY capi\geos_c.h.in capi\geos_c.h
@ECHO #define GEOS_REVISION "0" > geos_revision.h
REM Empty string as dummy git SHA-1
@ECHO #define GEOS_REVISION "" > geos_revision.h
......@@ -21,8 +21,8 @@ set(geos_c_SOURCES
file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group issue
if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
# if building OS X framework, CAPI built into C++ library
if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
# if building OS X framework or only building static libs, CAPI built into C++ library
add_library(geos_c SHARED ${geos_c_SOURCES})
target_link_libraries(geos_c geos)
......@@ -42,6 +42,8 @@ if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
endif()
add_dependencies(geos_c geos_revision)
#################################################################################
# Installation
#################################################################################
......@@ -55,7 +57,7 @@ else()
DESTINATION include)
endif()
if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
install(TARGETS geos_c
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
......
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -94,6 +94,9 @@ subdir = capi
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/macros/ac_pkg_swig.m4 \
$(top_srcdir)/macros/ac_python_devel.m4 \
$(top_srcdir)/macros/ax_check_compile_flag.m4 \
$(top_srcdir)/macros/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/macros/ax_cxx_compile_stdcxx_11.m4 \
$(top_srcdir)/macros/libtool.m4 \
$(top_srcdir)/macros/ltoptions.m4 \
$(top_srcdir)/macros/ltsugar.m4 \
......@@ -163,7 +166,9 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -I$(top_builddir)/include/geos
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/libgeos_c_la-geos_c.Plo \
./$(DEPDIR)/libgeos_c_la-geos_ts_c.Plo
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
......@@ -254,6 +259,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HAVE_CXX11 = @HAVE_CXX11@
INLINE_FLAGS = @INLINE_FLAGS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
......@@ -302,6 +308,8 @@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RUBY = @RUBY@
RUBY_ARCH_INCLUDE_DIR = @RUBY_ARCH_INCLUDE_DIR@
RUBY_ARCH_LIB_DIR = @RUBY_ARCH_LIB_DIR@
RUBY_BIN_DIR = @RUBY_BIN_DIR@
RUBY_EXTENSION_DIR = @RUBY_EXTENSION_DIR@
RUBY_INCLUDE_DIR = @RUBY_INCLUDE_DIR@
......@@ -322,6 +330,7 @@ VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION_PATCH = @VERSION_PATCH@
VERSION_RELEASE = @VERSION_RELEASE@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
......@@ -430,8 +439,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
......@@ -489,8 +498,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgeos_c_la-geos_c.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgeos_c_la-geos_ts_c.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgeos_c_la-geos_c.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgeos_c_la-geos_ts_c.Plo@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.cpp.o:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......@@ -606,7 +621,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
......@@ -679,7 +697,8 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/libgeos_c_la-geos_c.Plo
-rm -f ./$(DEPDIR)/libgeos_c_la-geos_ts_c.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
......@@ -725,7 +744,8 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/libgeos_c_la-geos_c.Plo
-rm -f ./$(DEPDIR)/libgeos_c_la-geos_ts_c.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
......@@ -746,9 +766,9 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-nodist_capiHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
......
......@@ -3,7 +3,7 @@
*
* C-Wrapper for GEOS library
*
* Copyright (C) 2010 2011 Sandro Santilli <strk@keybit.net>
* Copyright (C) 2010 2011 Sandro Santilli <strk@kbt.io>
* Copyright (C) 2005-2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
......@@ -11,7 +11,7 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
* Author: Sandro Santilli <strk@keybit.net>
* Author: Sandro Santilli <strk@kbt.io>
*
***********************************************************************/
......@@ -21,10 +21,10 @@
#include <geos/io/WKBReader.h>
#include <geos/io/WKTWriter.h>
#include <geos/io/WKBWriter.h>
#include <geos/io/CLocalizer.h>
#include <geos/operation/overlay/OverlayOp.h>
#include <geos/operation/union/CascadedPolygonUnion.h>
#include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
#include <geos/algorithm/distance/DiscreteFrechetDistance.h>
#include <geos/util/Interrupt.h>
#include <stdexcept>
......@@ -73,7 +73,6 @@ using geos::io::WKTReader;
using geos::io::WKTWriter;
using geos::io::WKBReader;
using geos::io::WKBWriter;
using geos::io::CLocalizer;
using geos::index::strtree::STRtree;
......@@ -81,7 +80,7 @@ using geos::operation::overlay::OverlayOp;
using geos::operation::overlay::overlayOp;
using geos::operation::geounion::CascadedPolygonUnion;
typedef std::auto_ptr<Geometry> GeomAutoPtr;
typedef std::unique_ptr<Geometry> GeomPtr;
//## GLOBALS ################################################
......@@ -278,6 +277,12 @@ GEOSDistance(const Geometry *g1, const Geometry *g2, double *dist)
return GEOSDistance_r( handle, g1, g2, dist );
}
int
GEOSDistanceIndexed(const Geometry *g1, const Geometry *g2, double *dist)
{
return GEOSDistanceIndexed_r( handle, g1, g2, dist );
}
int
GEOSHausdorffDistance(const Geometry *g1, const Geometry *g2, double *dist)
{
......@@ -290,6 +295,18 @@ GEOSHausdorffDistanceDensify(const Geometry *g1, const Geometry *g2, double dens
return GEOSHausdorffDistanceDensify_r( handle, g1, g2, densifyFrac, dist );
}
int
GEOSFrechetDistance(const Geometry *g1, const Geometry *g2, double *dist)
{
return GEOSFrechetDistance_r( handle, g1, g2, dist );
}
int
GEOSFrechetDistanceDensify(const Geometry *g1, const Geometry *g2, double densifyFrac, double *dist)
{
return GEOSFrechetDistanceDensify_r( handle, g1, g2, densifyFrac, dist );
}
int
GEOSArea(const Geometry *g, double *area)
{
......@@ -648,6 +665,16 @@ GEOSGeomGetY(const Geometry *g, double *y)
return GEOSGeomGetY_r(handle, g, y);
}
/*
* For POINT
* returns 0 on exception, otherwise 1
*/
int
GEOSGeomGetZ(const Geometry *g1, double *z)
{
return GEOSGeomGetZ_r(handle, g1, z);
}
/*
* Call only on polygon
* Return a copy of the internal Geometry.
......@@ -705,6 +732,12 @@ GEOSLineMerge(const Geometry *g)
return GEOSLineMerge_r( handle, g );
}
Geometry *
GEOSReverse(const Geometry *g)
{
return GEOSReverse_r( handle, g );
}
int
GEOSGetSRID(const Geometry *g)
{
......@@ -832,6 +865,12 @@ GEOSCoordSeq_getDimensions(const CoordinateSequence *s, unsigned int *dims)
return GEOSCoordSeq_getDimensions_r( handle, s, dims );
}
int
GEOSCoordSeq_isCCW(const CoordinateSequence *s, char *is_ccw)
{
return GEOSCoordSeq_isCCW_r(handle, s, is_ccw);
}
void
GEOSCoordSeq_destroy(CoordinateSequence *s)
{
......@@ -898,6 +937,26 @@ GEOSGeom_getCoordinateDimension(const Geometry *g)
return GEOSGeom_getCoordinateDimension_r( handle, g );
}
int GEOS_DLL GEOSGeom_getXMin(const GEOSGeometry* g, double* value)
{
return GEOSGeom_getXMin_r(handle, g, value);
}
int GEOS_DLL GEOSGeom_getYMin(const GEOSGeometry* g, double* value)
{
return GEOSGeom_getYMin_r(handle, g, value);
}
int GEOS_DLL GEOSGeom_getXMax(const GEOSGeometry* g, double* value)
{
return GEOSGeom_getXMax_r(handle, g, value);
}
int GEOS_DLL GEOSGeom_getYMax(const GEOSGeometry* g, double* value)
{
return GEOSGeom_getYMax_r(handle, g, value);
}
Geometry *
GEOSSimplify(const Geometry *g, double tolerance)
{
......@@ -1345,4 +1404,15 @@ GEOSVoronoiDiagram(const Geometry *g, const Geometry *env, double tolerance, int
return GEOSVoronoiDiagram_r(handle, g, env, tolerance, onlyEdges);
}
int
GEOSSegmentIntersection(double ax0, double ay0, double ax1, double ay1,
double bx0, double by0, double bx1, double by1,
double* cx, double* cy)
{
return GEOSSegmentIntersection_r(handle,
ax0, ay0, ax1, ay1,
bx0, by0, bx1, by1,
cx, cy);
}
} /* extern "C" */
......@@ -3,7 +3,7 @@
*
* C-Wrapper for GEOS library
*
* Copyright (C) 2010 2011 Sandro Santilli <strk@keybit.net>
* Copyright (C) 2010 2011 Sandro Santilli <strk@kbt.io>
* Copyright (C) 2005 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
......@@ -11,7 +11,7 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
* Author: Sandro Santilli <strk@keybit.net>
* Author: Sandro Santilli <strk@kbt.io>
*
***********************************************************************
*
......@@ -21,7 +21,7 @@
* functions, and call finishGEOS() when done.
*
* - Currently you have to explicitly GEOSGeom_destroy() all
* GEOSGeom objects to avoid memory leaks, and to GEOSFree()
* GEOSGeom objects to avoid memory leaks, and GEOSFree()
* all returned char * (unless const).
*
* - Functions ending with _r are thread safe; see details in RFC 3
......@@ -59,30 +59,30 @@ extern "C" {
#if defined(_MSC_VER)
#include <geos/version.h>
#define GEOS_CAPI_VERSION_MAJOR 1
#define GEOS_CAPI_VERSION_MINOR 10
#define GEOS_CAPI_VERSION_PATCH 2
#define GEOS_CAPI_VERSION "3.6.2-CAPI-1.10.2"
#define GEOS_CAPI_VERSION_MINOR 11
#define GEOS_CAPI_VERSION_PATCH 0
#define GEOS_CAPI_VERSION "3.7.0-CAPI-1.11.0"
#else
#ifndef GEOS_VERSION_MAJOR
#define GEOS_VERSION_MAJOR 3
#endif
#ifndef GEOS_VERSION_MINOR
#define GEOS_VERSION_MINOR 6
#define GEOS_VERSION_MINOR 7
#endif
#ifndef GEOS_VERSION_PATCH
#define GEOS_VERSION_PATCH 2
#define GEOS_VERSION_PATCH 0
#endif
#ifndef GEOS_VERSION
#define GEOS_VERSION "3.6.2"
#define GEOS_VERSION "3.7.0"
#endif
#ifndef GEOS_JTS_PORT
#define GEOS_JTS_PORT "1.13.0"
#endif
#define GEOS_CAPI_VERSION_MAJOR 1
#define GEOS_CAPI_VERSION_MINOR 10
#define GEOS_CAPI_VERSION_PATCH 2
#define GEOS_CAPI_VERSION "3.6.2-CAPI-1.10.2"
#define GEOS_CAPI_VERSION_MINOR 11
#define GEOS_CAPI_VERSION_PATCH 0
#define GEOS_CAPI_VERSION "3.7.0-CAPI-1.11.0"
#endif
#define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR
......@@ -146,7 +146,7 @@ enum GEOSGeomTypes {
GEOS_GEOMETRYCOLLECTION
};
/* Byte oders exposed via the c api */
/* Byte orders exposed via the C API */
enum GEOSByteOrders {
GEOS_WKB_XDR = 0, /* Big Endian */
GEOS_WKB_NDR = 1 /* Little Endian */
......@@ -346,6 +346,14 @@ extern int GEOS_DLL GEOSCoordSeq_getSize_r(GEOSContextHandle_t handle,
extern int GEOS_DLL GEOSCoordSeq_getDimensions_r(GEOSContextHandle_t handle,
const GEOSCoordSequence* s,
unsigned int *dims);
/*
* Check orientation of a CoordinateSequence and set 'is_ccw' to 1
* if it has counter-clockwise orientation, 0 otherwise.
* Return 0 on exception, 1 on success.
*/
extern int GEOS_DLL GEOSCoordSeq_isCCW_r(GEOSContextHandle_t handle,
const GEOSCoordSequence* s,
char* is_ccw);
/************************************************************************
*
......@@ -638,6 +646,8 @@ extern GEOSGeometry GEOS_DLL *GEOSPolygonize_full_r(GEOSContextHandle_t handle,
extern GEOSGeometry GEOS_DLL *GEOSLineMerge_r(GEOSContextHandle_t handle,
const GEOSGeometry* g);
extern GEOSGeometry GEOS_DLL *GEOSReverse_r(GEOSContextHandle_t handle,
const GEOSGeometry* g);
extern GEOSGeometry GEOS_DLL *GEOSSimplify_r(GEOSContextHandle_t handle,
const GEOSGeometry* g,
double tolerance);
......@@ -696,7 +706,7 @@ extern GEOSGeometry GEOS_DLL * GEOSDelaunayTriangulation_r(
*
* @param g the input geometry whose vertex will be used as sites.
* @param tolerance snapping tolerance to use for improved robustness
* @param onlyEdges whether to return only edges of the voronoi cells
* @param onlyEdges whether to return only edges of the Voronoi cells
* @param env clipping envelope for the returned diagram, automatically
* determined if NULL.
* The diagram will be clipped to the larger
......@@ -711,6 +721,30 @@ extern GEOSGeometry GEOS_DLL * GEOSVoronoiDiagram_r(
double tolerance,
int onlyEdges);
/*
* Computes the coordinate where two line segments intersect, if any
*
* @param ax0 x-coordinate of first point in first segment
* @param ay0 y-coordinate of first point in first segment
* @param ax1 x-coordinate of second point in first segment
* @param ay1 y-coordinate of second point in first segment
* @param bx0 x-coordinate of first point in second segment
* @param by0 y-coordinate of first point in second segment
* @param bx1 x-coordinate of second point in second segment
* @param by1 y-coordinate of second point in second segment
* @param cx x-coordinate of intersection point
* @param cy y-coordinate of intersection point
*
* @return 0 on error, 1 on success, -1 if segments do not intersect
*/
extern int GEOS_DLL GEOSSegmentIntersection_r(
GEOSContextHandle_t extHandle,
double ax0, double ay0,
double ax1, double ay1,
double bx0, double by0,
double bx1, double by1,
double* cx, double* cy);
/************************************************************************
*
......@@ -1035,6 +1069,7 @@ extern int GEOS_DLL GEOSGeomGetNumPoints_r(GEOSContextHandle_t handle,
/* Return -1 on exception, Geometry must be a Point. */
extern int GEOS_DLL GEOSGeomGetX_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *x);
extern int GEOS_DLL GEOSGeomGetY_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *y);
extern int GEOS_DLL GEOSGeomGetZ_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *z);
/*
* Return NULL on exception, Geometry must be a Polygon.
......@@ -1077,6 +1112,13 @@ extern int GEOS_DLL GEOSGeom_getDimensions_r(GEOSContextHandle_t handle,
*/
extern int GEOS_DLL GEOSGeom_getCoordinateDimension_r(GEOSContextHandle_t handle,
const GEOSGeometry* g);
/*
* Return 0 on exception
*/
extern int GEOS_DLL GEOSGeom_getXMin_r(GEOSContextHandle_t handle, const GEOSGeometry* g, double* value);
extern int GEOS_DLL GEOSGeom_getYMin_r(GEOSContextHandle_t handle, const GEOSGeometry* g, double* value);
extern int GEOS_DLL GEOSGeom_getXMax_r(GEOSContextHandle_t handle, const GEOSGeometry* g, double* value);
extern int GEOS_DLL GEOSGeom_getYMax_r(GEOSContextHandle_t handle, const GEOSGeometry* g, double* value);
/*
* Return NULL on exception.
......@@ -1100,6 +1142,9 @@ extern int GEOS_DLL GEOSLength_r(GEOSContextHandle_t handle,
extern int GEOS_DLL GEOSDistance_r(GEOSContextHandle_t handle,
const GEOSGeometry* g1,
const GEOSGeometry* g2, double *dist);
extern int GEOS_DLL GEOSDistanceIndexed_r(GEOSContextHandle_t handle,
const GEOSGeometry* g1,
const GEOSGeometry* g2, double *dist);
extern int GEOS_DLL GEOSHausdorffDistance_r(GEOSContextHandle_t handle,
const GEOSGeometry *g1,
const GEOSGeometry *g2,
......@@ -1108,6 +1153,14 @@ extern int GEOS_DLL GEOSHausdorffDistanceDensify_r(GEOSContextHandle_t handle,
const GEOSGeometry *g1,
const GEOSGeometry *g2,
double densifyFrac, double *dist);
extern int GEOS_DLL GEOSFrechetDistance_r(GEOSContextHandle_t handle,
const GEOSGeometry *g1,
const GEOSGeometry *g2,
double *dist);
extern int GEOS_DLL GEOSFrechetDistanceDensify_r(GEOSContextHandle_t handle,
const GEOSGeometry *g1,
const GEOSGeometry *g2,
double densifyFrac, double *dist);
extern int GEOS_DLL GEOSGeomGetLength_r(GEOSContextHandle_t handle,
const GEOSGeometry *g, double *length);
......@@ -1352,6 +1405,13 @@ extern int GEOS_DLL GEOSCoordSeq_getSize(const GEOSCoordSequence* s,
extern int GEOS_DLL GEOSCoordSeq_getDimensions(const GEOSCoordSequence* s,
unsigned int *dims);
/*
* Check orientation of a CoordinateSequence and set 'is_ccw' to 1
* if it has counter-clockwise orientation, 0 otherwise.
* Return 0 on exception, 1 on success.
*/
extern int GEOS_DLL GEOSCoordSeq_isCCW(const GEOSCoordSequence* s, char* is_ccw);
/************************************************************************
*
* Linear referencing functions -- there are more, but these are
......@@ -1585,6 +1645,7 @@ extern GEOSGeometry GEOS_DLL *GEOSPolygonize_full(const GEOSGeometry* input,
GEOSGeometry** cuts, GEOSGeometry** dangles, GEOSGeometry** invalid);
extern GEOSGeometry GEOS_DLL *GEOSLineMerge(const GEOSGeometry* g);
extern GEOSGeometry GEOS_DLL *GEOSReverse(const GEOSGeometry* g);
extern GEOSGeometry GEOS_DLL *GEOSSimplify(const GEOSGeometry* g, double tolerance);
extern GEOSGeometry GEOS_DLL *GEOSTopologyPreserveSimplify(const GEOSGeometry* g,
double tolerance);
......@@ -1651,6 +1712,29 @@ extern GEOSGeometry GEOS_DLL * GEOSVoronoiDiagram(
const GEOSGeometry *env,
double tolerance,
int onlyEdges);
/*
* Computes the coordinate where two line segments intersect, if any
*
* @param ax0 x-coordinate of first point in first segment
* @param ay0 y-coordinate of first point in first segment
* @param ax1 x-coordinate of second point in first segment
* @param ay1 y-coordinate of second point in first segment
* @param bx0 x-coordinate of first point in second segment
* @param by0 y-coordinate of first point in second segment
* @param bx1 x-coordinate of second point in second segment
* @param by1 y-coordinate of second point in second segment
* @param cx x-coordinate of intersection point
* @param cy y-coordinate of intersection point
*
* @return 0 on error, 1 on success, -1 if segments do not intersect
*/
extern int GEOS_DLL GEOSSegmentIntersection(
double ax0, double ay0,
double ax1, double ay1,
double bx0, double by0,
double bx1, double by1,
double* cx, double* cy);
/************************************************************************
*
......@@ -1910,6 +1994,7 @@ extern int GEOS_DLL GEOSGeomGetNumPoints(const GEOSGeometry* g);
/* Return -1 on exception, Geometry must be a Point. */
extern int GEOS_DLL GEOSGeomGetX(const GEOSGeometry *g, double *x);
extern int GEOS_DLL GEOSGeomGetY(const GEOSGeometry *g, double *y);
extern int GEOS_DLL GEOSGeomGetZ(const GEOSGeometry *g, double *z);
/*
* Return NULL on exception, Geometry must be a Polygon.
......@@ -1944,6 +2029,14 @@ extern int GEOS_DLL GEOSGeom_getDimensions(const GEOSGeometry* g);
*/
extern int GEOS_DLL GEOSGeom_getCoordinateDimension(const GEOSGeometry* g);
/*
* Return 0 on exception
*/
extern int GEOS_DLL GEOSGeom_getXMin(const GEOSGeometry* g, double* value);
extern int GEOS_DLL GEOSGeom_getYMin(const GEOSGeometry* g, double* value);
extern int GEOS_DLL GEOSGeom_getXMax(const GEOSGeometry* g, double* value);
extern int GEOS_DLL GEOSGeom_getYMax(const GEOSGeometry* g, double* value);
/*
* Return NULL on exception.
* Must be LineString and must be freed by called.
......@@ -1963,10 +2056,16 @@ extern int GEOS_DLL GEOSArea(const GEOSGeometry* g, double *area);
extern int GEOS_DLL GEOSLength(const GEOSGeometry* g, double *length);
extern int GEOS_DLL GEOSDistance(const GEOSGeometry* g1, const GEOSGeometry* g2,
double *dist);
extern int GEOS_DLL GEOSDistanceIndexed(const GEOSGeometry* g1, const GEOSGeometry* g2,
double *dist);
extern int GEOS_DLL GEOSHausdorffDistance(const GEOSGeometry *g1,
const GEOSGeometry *g2, double *dist);
extern int GEOS_DLL GEOSHausdorffDistanceDensify(const GEOSGeometry *g1,
const GEOSGeometry *g2, double densifyFrac, double *dist);
extern int GEOS_DLL GEOSFrechetDistance(const GEOSGeometry *g1,
const GEOSGeometry *g2, double *dist);
extern int GEOS_DLL GEOSFrechetDistanceDensify(const GEOSGeometry *g1,
const GEOSGeometry *g2, double densifyFrac, double *dist);
extern int GEOS_DLL GEOSGeomGetLength(const GEOSGeometry *g, double *length);
/* Return 0 on exception, the closest points of the two geometries otherwise.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.