Hello community, here is the log from the commit of package geos for openSUSE:Factory checked in at 2019-06-25 22:21:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/geos (Old) and /work/SRC/openSUSE:Factory/.geos.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "geos" Tue Jun 25 22:21:44 2019 rev:11 rq:709442 version:3.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/geos/geos.changes 2019-02-27 17:28:38.475331702 +0100 +++ /work/SRC/openSUSE:Factory/.geos.new.4615/geos.changes 2019-06-25 22:21:45.749096292 +0200 @@ -1,0 +2,9 @@ +Wed Jun 12 14:09:59 UTC 2019 - Martin Pluskal <[email protected]> + +- Update to version 3.7.2 + * Envelope constructor using strtod (#875 Paul Ramsey) + * Failure in CMake for OSX Framework (#936 Paul Ramsey) + * Polygon build failure in Overlay difference (#789 Paul Ramsey) + * Invalid union result from valid polygon inputs (#838) + +------------------------------------------------------------------- Old: ---- geos-3.7.1.tar.bz2 New: ---- geos-3.7.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ geos.spec ++++++ --- /var/tmp/diff_new_pack.zhZjmB/_old 2019-06-25 22:21:46.293097038 +0200 +++ /var/tmp/diff_new_pack.zhZjmB/_new 2019-06-25 22:21:46.297097044 +0200 @@ -16,9 +16,9 @@ # -%define uver 3_7_1 +%define uver 3_7_2 Name: geos -Version: 3.7.1 +Version: 3.7.2 Release: 0 Summary: Geometry Engine - Open Source License: LGPL-2.1-only ++++++ geos-3.7.1.tar.bz2 -> geos-3.7.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/CMakeLists.txt new/geos-3.7.2/CMakeLists.txt --- old/geos-3.7.1/CMakeLists.txt 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/CMakeLists.txt 2019-05-03 00:29:15.000000000 +0200 @@ -23,7 +23,7 @@ ################################################################################# # Set GEOS project ################################################################################# -project(GEOS VERSION 3.7.0 LANGUAGES C CXX) +project(GEOS VERSION 3.7.2 LANGUAGES C CXX) # Add custom GEOS modules for CMake list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") @@ -58,7 +58,7 @@ # GEOS C API version set(CAPI_INTERFACE_CURRENT 12) -set(CAPI_INTERFACE_REVISION 0) +set(CAPI_INTERFACE_REVISION 2) set(CAPI_INTERFACE_AGE 11) math(EXPR CAPI_VERSION_MAJOR "${CAPI_INTERFACE_CURRENT} - ${CAPI_INTERFACE_AGE}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/ChangeLog new/geos-3.7.2/ChangeLog --- old/geos-3.7.1/ChangeLog 2018-11-30 00:35:22.000000000 +0100 +++ new/geos-3.7.2/ChangeLog 2019-05-03 00:30:49.000000000 +0200 @@ -1,3 +1,79 @@ +2019-05-02 Paul Ramsey <[email protected]> + + * NEWS: Set date for 3.7.2 release + +2019-02-04 Regina Obe <[email protected]> + + * HOWTO_RELEASE, README.md: Update instructions to include updating + the readme. Fix some old bot links + +2019-02-04 Regina Obe <[email protected]> + + Merge branch '3.7' of https://git.osgeo.org/gitea/geos/geos into + 3.7 + +2019-02-04 Regina Obe <[email protected]> + + * .drone-1.0.yml, README.md: Update badges to 3.7 (was stuck at + 3.6), update drone to dronie (1.0 server) + +2019-01-28 Paul Ramsey <[email protected]> + + * NEWS, src/noding/SingleInteriorIntersectionFinder.cpp, + tests/xmltester/CMakeLists.txt, tests/xmltester/Makefile.am, + tests/xmltester/tests/ticket/bug838.xml: Invalid union result from + valid polygon inputs References #838 + +2019-01-28 Paul Ramsey <[email protected]> + + * NEWS, src/operation/overlay/PolygonBuilder.cpp, + tests/xmltester/tests/general/TestFunctionAA.xml: Polygon build + failure in Overlay difference References #789 + +2019-01-28 Paul Ramsey <[email protected]> + + * NEWS, capi/CMakeLists.txt, src/CMakeLists.txt: fail with cmake + -DGEOS_ENABLE_MACOSX_FRAMEWORK=NO Closes #936 + +2019-01-25 Paul Ramsey <[email protected]> + + * src/geom/Envelope.cpp: Convert from nullptr to NULL + +2019-01-25 Paul Ramsey <[email protected]> + + * NEWS: Update news + +2019-01-25 Paul Ramsey <[email protected]> + + * src/geom/Envelope.cpp: Change Envelope constructor to use strtod + References #875 + +2018-12-21 Regina Obe <[email protected]> + + Merge branch '3.7' of https://git.osgeo.org/gitea/geos/geos into + 3.7 + +2018-12-20 Paul Ramsey <[email protected]> + + * CMakeLists.txt: Remove 'dev' suffix from patch number + +2018-12-20 Regina Obe <[email protected]> + + * configure.ac: Change version to 3.7.2dev from 3.7.2 + +2018-12-08 Regina Obe <[email protected]> + + * CMakeLists.txt, include/geos/version.h.vc: More version number + updates + +2018-12-08 Regina Obe <[email protected]> + + * CMakeLists.txt, capi/geos_c.h.in: Increment to GEOS 3.7.2 + +2018-11-29 Paul Ramsey <[email protected]> + + * NEWS, configure.ac: Bump versions for next dev cycle + 2018-11-29 Paul Ramsey <[email protected]> * NEWS, configure.ac: News and version bump for 3.7.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/NEWS new/geos-3.7.2/NEWS --- old/geos-3.7.1/NEWS 2018-11-30 00:31:11.000000000 +0100 +++ new/geos-3.7.2/NEWS 2019-05-03 00:46:35.000000000 +0200 @@ -1,3 +1,13 @@ +Changes in 3.7.2 +2019-05-02 + +- Bug fixes / improvements + - Envelope constructor using strtod (#875 Paul Ramsey) + - Failure in CMake for OSX Framework (#936 Paul Ramsey) + - Polygon build failure in Overlay difference (#789 Paul Ramsey) + - Invalid union result from valid polygon inputs (#838) + + Changes in 3.7.1 2018-11-29 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/README.md new/geos-3.7.2/README.md --- old/geos-3.7.1/README.md 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/README.md 2019-05-03 00:29:43.000000000 +0200 @@ -7,8 +7,8 @@ | branch / CI | Debbie | Winnie | Dronie | Travis CI | GitLab CI | AppVeyor | Bessie | Bessie32 | |:--- |:--- |:--- |:--- |:--- |:--- |:--- |:--- |:--- | -| master | [](https://debbie.postgis.net/view/GEOS/job/GEOS_Master/) | [](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Master/) | [](https://drone.osgeo.org/geos/geos?branch=master) | [](https://travis-ci.com/libgeos/geos?branch=master) | [](https://gitlab.com/geos/libgeos/commits/master) | [](https://ci.appveyor.com/project/OSGeo/geos/branch/master) | [](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) | [](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32) || -| svn-3.6 | [](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.6/) | [](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.6/) | [](https://drone.osgeo.org/geos/geos?branch=svn-3.6) | [](https://travis-ci.com/libgeos/geos?branch=svn-3.6) | [](https://gitlab.com/geos/libgeos/commits/svn-3.6) | [](https://ci.appveyor.com/project/OSGeo/geos/branch/svn-3.6) | +| 3.7 | [](https://debbie.postgis.net/view/GEOS/job/GEOS_3.7/) | [](https://winnie.postgis.net:444/view/GEOS/job/GEOS_3.7/) | [](https://drone.osgeo.org/geos/geos?branch=3.7) | [](https://travis-ci.com/libgeos/geos?branch=3.7) | [](https://gitlab.com/geos/libgeos/commits/3.7) | [](https://ci.appveyor.com/project/OSGeo/geos/branch/3.7) | [](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie) | [](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32) || +| 3.7 | [](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.7/) | [](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.7/) | [](https://dronie.osgeo.org/geos/geos?branch=3.7) | [](https://travis-ci.com/libgeos/geos?branch=3.7) | [](https://gitlab.com/geos/libgeos/commits/3.7) | [](https://ci.appveyor.com/project/OSGeo/geos/branch/3.7) | More on: https://trac.osgeo.org/geos#BuildandInstall @@ -105,7 +105,7 @@ ./configure ... --enable-ruby -Since version 3.6.0 PHP bindings are not included in the core +Since version 3.7.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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/aclocal.m4 new/geos-3.7.2/aclocal.m4 --- old/geos-3.7.1/aclocal.m4 2018-11-30 00:05:14.000000000 +0100 +++ new/geos-3.7.2/aclocal.m4 2019-05-03 00:29:53.000000000 +0200 @@ -20,6 +20,44 @@ 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'.])]) +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_REQUIRE_DEFINED(MACRO) +# +# DESCRIPTION +# +# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have +# been defined and thus are available for use. This avoids random issues +# where a macro isn't expanded. Instead the configure script emits a +# non-fatal: +# +# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found +# +# It's like AC_REQUIRE except it doesn't expand the required macro. +# +# Here's an example: +# +# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) +# +# LICENSE +# +# Copyright (c) 2014 Mike Frysinger <[email protected]> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 2 + +AC_DEFUN([AX_REQUIRE_DEFINED], [dnl + m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) +])dnl AX_REQUIRE_DEFINED + # Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/capi/CMakeLists.txt new/geos-3.7.2/capi/CMakeLists.txt --- old/geos-3.7.1/capi/CMakeLists.txt 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/capi/CMakeLists.txt 2019-05-02 18:11:53.000000000 +0200 @@ -40,9 +40,10 @@ CLEAN_DIRECT_OUTPUT 1) endif() + add_dependencies(geos_c geos_revision) + endif() -add_dependencies(geos_c geos_revision) ################################################################################# # Installation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/capi/geos_c.h new/geos-3.7.2/capi/geos_c.h --- old/geos-3.7.1/capi/geos_c.h 2018-11-30 00:05:39.000000000 +0100 +++ new/geos-3.7.2/capi/geos_c.h 2019-05-03 00:30:16.000000000 +0200 @@ -61,7 +61,7 @@ #define GEOS_CAPI_VERSION_MAJOR 1 #define GEOS_CAPI_VERSION_MINOR 11 #define GEOS_CAPI_VERSION_PATCH 0 -#define GEOS_CAPI_VERSION "3.7.0-CAPI-1.11.0" +#define GEOS_CAPI_VERSION "3.7.2-CAPI-1.11.0" #else #ifndef GEOS_VERSION_MAJOR #define GEOS_VERSION_MAJOR 3 @@ -70,10 +70,10 @@ #define GEOS_VERSION_MINOR 7 #endif #ifndef GEOS_VERSION_PATCH -#define GEOS_VERSION_PATCH 1 +#define GEOS_VERSION_PATCH 2 #endif #ifndef GEOS_VERSION -#define GEOS_VERSION "3.7.1" +#define GEOS_VERSION "3.7.2" #endif #ifndef GEOS_JTS_PORT #define GEOS_JTS_PORT "1.13.0" @@ -81,8 +81,8 @@ #define GEOS_CAPI_VERSION_MAJOR 1 #define GEOS_CAPI_VERSION_MINOR 11 -#define GEOS_CAPI_VERSION_PATCH 1 -#define GEOS_CAPI_VERSION "3.7.1-CAPI-1.11.1" +#define GEOS_CAPI_VERSION_PATCH 2 +#define GEOS_CAPI_VERSION "3.7.2-CAPI-1.11.2" #endif #define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/capi/geos_c.h.in new/geos-3.7.2/capi/geos_c.h.in --- old/geos-3.7.1/capi/geos_c.h.in 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/capi/geos_c.h.in 2019-05-02 18:11:53.000000000 +0200 @@ -61,7 +61,7 @@ #define GEOS_CAPI_VERSION_MAJOR 1 #define GEOS_CAPI_VERSION_MINOR 11 #define GEOS_CAPI_VERSION_PATCH 0 -#define GEOS_CAPI_VERSION "3.7.0-CAPI-1.11.0" +#define GEOS_CAPI_VERSION "3.7.2-CAPI-1.11.0" #else #ifndef GEOS_VERSION_MAJOR #define GEOS_VERSION_MAJOR @VERSION_MAJOR@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/configure new/geos-3.7.2/configure --- old/geos-3.7.1/configure 2018-11-30 00:05:20.000000000 +0100 +++ new/geos-3.7.2/configure 2019-05-03 00:29:59.000000000 +0200 @@ -2615,12 +2615,12 @@ JTS_PORT=1.13.0 CAPI_INTERFACE_CURRENT=12 -CAPI_INTERFACE_REVISION=1 +CAPI_INTERFACE_REVISION=2 CAPI_INTERFACE_AGE=11 VERSION_MAJOR=3 VERSION_MINOR=7 -VERSION_PATCH=1 +VERSION_PATCH=2 VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH" VERSION_RELEASE=`echo "$VERSION" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*$/\1/'` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/configure.ac new/geos-3.7.2/configure.ac --- old/geos-3.7.1/configure.ac 2018-11-30 00:04:39.000000000 +0100 +++ new/geos-3.7.2/configure.ac 2019-05-03 00:27:07.000000000 +0200 @@ -15,7 +15,7 @@ dnl -- Version info for the CAPI CAPI_INTERFACE_CURRENT=12 -CAPI_INTERFACE_REVISION=1 +CAPI_INTERFACE_REVISION=2 CAPI_INTERFACE_AGE=11 dnl @@ -24,7 +24,7 @@ dnl VERSION_MAJOR=3 VERSION_MINOR=7 -VERSION_PATCH=1 +VERSION_PATCH=2 VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH" VERSION_RELEASE=`echo "$VERSION" | sed -E 's/^([[0-9]+\.[0-9]+\.[0-9]+]).*$/\1/'` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/doc/Doxyfile new/geos-3.7.2/doc/Doxyfile --- old/geos-3.7.1/doc/Doxyfile 2018-11-30 00:05:39.000000000 +0100 +++ new/geos-3.7.2/doc/Doxyfile 2019-05-03 00:30:16.000000000 +0200 @@ -23,7 +23,7 @@ # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.7.1 +PROJECT_NUMBER = 3.7.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -308,7 +308,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ./../src ./../include ./../capi +INPUT = ../../geos-git/doc/../src ../../geos-git/doc/../include ../../geos-git/doc/../capi # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/geos_revision.h new/geos-3.7.2/geos_revision.h --- old/geos-3.7.1/geos_revision.h 2018-11-30 00:34:53.000000000 +0100 +++ new/geos-3.7.2/geos_revision.h 2019-05-03 00:30:25.000000000 +0200 @@ -1 +1 @@ -#define GEOS_REVISION "27a5e771" +#define GEOS_REVISION "b55d2125" Binary files old/geos-3.7.1/include/geos/geom/._CoordinateArraySequenceFactory.inl and new/geos-3.7.2/include/geos/geom/._CoordinateArraySequenceFactory.inl differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/include/geos/version.h.vc new/geos-3.7.2/include/geos/version.h.vc --- old/geos-3.7.1/include/geos/version.h.vc 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/include/geos/version.h.vc 2019-05-02 18:11:53.000000000 +0200 @@ -34,11 +34,11 @@ #endif #ifndef GEOS_VERSION_PATCH -#define GEOS_VERSION_PATCH 0 +#define GEOS_VERSION_PATCH 2 #endif #ifndef GEOS_VERSION -#define GEOS_VERSION "3.7.0" +#define GEOS_VERSION "3.7.2" #endif #ifndef GEOS_JTS_PORT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/src/CMakeLists.txt new/geos-3.7.2/src/CMakeLists.txt --- old/geos-3.7.1/src/CMakeLists.txt 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/src/CMakeLists.txt 2019-05-02 18:11:53.000000000 +0200 @@ -6,7 +6,7 @@ # # This is free software; you can redistribute and/or modify it under # the terms of the GNU Lesser General Public Licence as published -# by the Free Software Foundation. +# by the Free Software Foundation. # See the COPYING file for more information. # ################################################################################# @@ -26,16 +26,15 @@ add_library(GEOS SHARED ${geos_SOURCES} ${geos_c_SOURCES}) - math(EXPR CVERSION "${VERSION_MAJOR} + 1") - # VERSION = current version, SOVERSION = compatibility version + math(EXPR CVERSION "${VERSION_MAJOR} + 1") + # VERSION = current version, SOVERSION = compatibility version set_target_properties(GEOS PROPERTIES CLEAN_DIRECT_OUTPUT 1 FRAMEWORK 1 - VERSION "${CVERSION}.${VERSION_MINOR}.${VERSION_PATCH}" - SOVERSION ${CVERSION} + VERSION "${CVERSION}.${VERSION_MINOR}.${VERSION_PATCH}" + SOVERSION ${CVERSION} FRAMEWORK_VERSION ${VERSION_MAJOR} - BUILD_WITH_INSTALL_RPATH TRUE INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}" MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in" MACOSX_FRAMEWORK_BUNDLE_VERSION "GEOS ${VERSION}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/src/geom/Envelope.cpp new/geos-3.7.2/src/geom/Envelope.cpp --- old/geos-3.7.1/src/geom/Envelope.cpp 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/src/geom/Envelope.cpp 2019-05-02 18:11:53.000000000 +0200 @@ -140,10 +140,10 @@ vector<string> values = split(coordString, ":,"); // create a new envelopet - init(::atof(values[0].c_str()), - ::atof(values[1].c_str()), - ::atof(values[2].c_str()), - ::atof(values[3].c_str())); + init(strtod(values[0].c_str(), NULL), + strtod(values[1].c_str(), NULL), + strtod(values[2].c_str(), NULL), + strtod(values[3].c_str(), NULL)); } /*public*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/src/noding/SingleInteriorIntersectionFinder.cpp new/geos-3.7.2/src/noding/SingleInteriorIntersectionFinder.cpp --- old/geos-3.7.1/src/noding/SingleInteriorIntersectionFinder.cpp 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/src/noding/SingleInteriorIntersectionFinder.cpp 2019-05-02 18:11:53.000000000 +0200 @@ -12,7 +12,7 @@ * ********************************************************************** * - * Last port: noding/SingleInteriorIntersectionFinder.java rev. ??? (JTS-1.8) + * Last port: noding/SingleInteriorIntersectionFinder.java rev. 2019-01-28 * **********************************************************************/ @@ -23,6 +23,38 @@ using namespace geos::geom; + +namespace { // anonymous + + /* private in JTS */ + bool isEndInteriorIntersection( + const Coordinate& p0, bool isEnd0, + const Coordinate& p1, bool isEnd1) + { + if (isEnd0 && isEnd1) return false; + if (p0.equals2D(p1)) { + return true; + } + return false; + } + + /* public in JTS */ + bool isEndInteriorIntersection( + const Coordinate& p00, const Coordinate& p01, + const Coordinate& p10, const Coordinate& p11, + bool isEnd00, bool isEnd01, + bool isEnd10, bool isEnd11) + { + if (isEndInteriorIntersection(p00, isEnd00, p10, isEnd10)) return true; + if (isEndInteriorIntersection(p00, isEnd00, p11, isEnd11)) return true; + if (isEndInteriorIntersection(p01, isEnd01, p10, isEnd10)) return true; + if (isEndInteriorIntersection(p01, isEnd01, p11, isEnd11)) return true; + return false; + } + +} // anonymous namespace + + namespace geos { namespace noding { // geos.noding @@ -46,22 +78,28 @@ const Coordinate& p10 = e1->getCoordinate(segIndex1); const Coordinate& p11 = e1->getCoordinate(segIndex1 + 1); + bool isEnd00 = segIndex0 == 0; + bool isEnd01 = segIndex0 + 2 == static_cast<int>(e0->size()); + bool isEnd10 = segIndex1 == 0; + bool isEnd11 = segIndex1 + 2 == static_cast<int>(e1->size()); + li.computeIntersection(p00, p01, p10, p11); //if (li.hasIntersection() && li.isProper()) Debug.println(li); - - if (li.hasIntersection()) - { - if (li.isInteriorIntersection()) - { - intSegments.resize(4); - intSegments[0] = p00; - intSegments[1] = p01; - intSegments[2] = p10; - intSegments[3] = p11; - - interiorIntersection = li.getIntersection(0); - } + bool isProperInteriorInt = li.hasIntersection() && + li.isInteriorIntersection(); + bool isEndInteriorInt = (e0 != e1) && isEndInteriorIntersection( + p00, p01, p10, p11, isEnd00, isEnd01, isEnd10, isEnd11); + + if (isProperInteriorInt || isEndInteriorInt) { + // found an intersection! + intSegments.resize(4); + intSegments[0] = p00; + intSegments[1] = p01; + intSegments[2] = p10; + intSegments[3] = p11; + interiorIntersection = li.getIntersection(0); } + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/src/operation/overlay/PolygonBuilder.cpp new/geos-3.7.2/src/operation/overlay/PolygonBuilder.cpp --- old/geos-3.7.1/src/operation/overlay/PolygonBuilder.cpp 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/src/operation/overlay/PolygonBuilder.cpp 2019-05-02 18:11:53.000000000 +0200 @@ -21,6 +21,7 @@ #include <geos/operation/overlay/OverlayOp.h> #include <geos/operation/overlay/MaximalEdgeRing.h> #include <geos/operation/overlay/MinimalEdgeRing.h> +#include <geos/operation/polygonize/EdgeRing.h> #include <geos/geomgraph/Node.h> #include <geos/geomgraph/NodeMap.h> #include <geos/geomgraph/DirectedEdgeStar.h> @@ -44,7 +45,6 @@ using namespace geos::algorithm; using namespace geos::geom; - namespace geos { namespace operation { // geos.operation namespace overlay { // geos.operation.overlay @@ -146,9 +146,9 @@ DirectedEdge *de=(*dirEdges)[i]; #if GEOS_DEBUG cerr << " dirEdge " << i << endl - << de->printEdge() << endl - << " inResult:" << de->isInResult() << endl - << " isArea:" << de->getLabel().isArea() << endl; + << de->printEdge() << endl + << " inResult:" << de->isInResult() << endl + << " isArea:" << de->getLabel().isArea() << endl; #endif if (de->isInResult() && de->getLabel().isArea()) { @@ -305,14 +305,14 @@ { geom = (*rIt)->toPolygon(geometryFactory); std::cerr << "INSERT INTO shells VALUES ('" - << *geom - << "');" << std::endl; + << *geom + << "');" << std::endl; delete geom; } geom = hole->toPolygon(geometryFactory); std::cerr << "INSERT INTO hole VALUES ('" - << *geom - << "');" << std::endl; + << *geom + << "');" << std::endl; delete geom; #endif //assert(shell!=NULL); // unable to assign hole to a shell @@ -331,30 +331,33 @@ { LinearRing *testRing=testEr->getLinearRing(); const Envelope *testEnv=testRing->getEnvelopeInternal(); - const Coordinate& testPt=testRing->getCoordinateN(0); EdgeRing *minShell=nullptr; - const Envelope *minEnv=nullptr; - for(size_t i=0, n=newShellList.size(); i<n; i++) + const Envelope *minShellEnv=nullptr; + + for(auto const& tryShell: newShellList) { - LinearRing *lr=nullptr; - EdgeRing *tryShell=newShellList[i]; - LinearRing *tryRing=tryShell->getLinearRing(); - const Envelope *tryEnv=tryRing->getEnvelopeInternal(); - if (minShell!=nullptr) { - lr=minShell->getLinearRing(); - minEnv=lr->getEnvelopeInternal(); - } - bool isContained=false; - const CoordinateSequence *rcl = tryRing->getCoordinatesRO(); - if (tryEnv->contains(testEnv) - && CGAlgorithms::isPointInRing(testPt,rcl)) - isContained=true; + LinearRing *tryShellRing = tryShell->getLinearRing(); + const Envelope *tryShellEnv=tryShellRing->getEnvelopeInternal(); + // hole must be contained in shell + // the hole envelope cannot equal the shell envelope + // (also guards against testing rings against themselves) + if (tryShellEnv->equals(testEnv)) continue; + // hole must be contained in shell + if (!tryShellEnv->contains(testEnv)) continue; + const CoordinateSequence *tsrcs = tryShellRing->getCoordinatesRO(); + Coordinate testPt = geos::operation::polygonize::EdgeRing::ptNotInList(testRing->getCoordinatesRO(), tsrcs); + + bool isContained = false; + if (CGAlgorithms::locatePointInRing(testPt, *tsrcs) != Location::EXTERIOR) + isContained = true; + // check if this new containing ring is smaller than // the current minimum ring if (isContained) { - if (minShell==nullptr - || minEnv->contains(tryEnv)) { - minShell=tryShell; + if (minShell==nullptr || + minShellEnv->contains(tryShellEnv)) { + minShell = tryShell; + minShellEnv = minShell->getLinearRing()->getEnvelopeInternal(); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/swig/geos.i new/geos-3.7.2/swig/geos.i --- old/geos-3.7.1/swig/geos.i 2018-11-30 00:05:45.000000000 +0100 +++ new/geos-3.7.2/swig/geos.i 2019-05-03 00:30:21.000000000 +0200 @@ -29,16 +29,16 @@ the whole c api. */ #define GEOS_VERSION_MAJOR 3 #define GEOS_VERSION_MINOR 7 -#define GEOS_VERSION_PATCH 1 -#define GEOS_VERSION "3.7.1" +#define GEOS_VERSION_PATCH 2 +#define GEOS_VERSION "3.7.2" #define GEOS_JTS_PORT "1.13.0" #define GEOS_CAPI_VERSION_MAJOR 1 #define GEOS_CAPI_VERSION_MINOR 11 -#define GEOS_CAPI_VERSION_PATCH 1 +#define GEOS_CAPI_VERSION_PATCH 2 #define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR #define GEOS_CAPI_LAST_INTERFACE (GEOS_CAPI_VERSION_MAJOR+GEOS_CAPI_VERSION_MINOR) -#define GEOS_CAPI_VERSION "3.7.1-CAPI-1.11.1" +#define GEOS_CAPI_VERSION "3.7.2-CAPI-1.11.2" /* Supported geometry types */ enum GEOSGeomTypes { @@ -123,11 +123,11 @@ #ifdef SWIGPYTHON - %include ../swig/python/python.i + %include ../../geos-git/swig/python/python.i #endif #ifdef SWIGRUBY - %include ../swig/ruby/ruby.i + %include ../../geos-git/swig/ruby/ruby.i #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/tests/xmltester/CMakeLists.txt new/geos-3.7.2/tests/xmltester/CMakeLists.txt --- old/geos-3.7.1/tests/xmltester/CMakeLists.txt 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/tests/xmltester/CMakeLists.txt 2019-05-02 18:11:53.000000000 +0200 @@ -62,6 +62,7 @@ ${XMLTESTS_DIR}/ticket/bug188.xml ${XMLTESTS_DIR}/ticket/bug244.xml ${XMLTESTS_DIR}/ticket/bug275.xml + ${XMLTESTS_DIR}/ticket/bug838.xml ${XMLTESTS_DIR}/general/TestBoundary.xml ${XMLTESTS_DIR}/general/TestBuffer.xml ${XMLTESTS_DIR}/general/TestBufferMitredJoin.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/tests/xmltester/Makefile.am new/geos-3.7.2/tests/xmltester/Makefile.am --- old/geos-3.7.1/tests/xmltester/Makefile.am 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/tests/xmltester/Makefile.am 2019-05-02 18:11:53.000000000 +0200 @@ -44,6 +44,7 @@ $(srcdir)/tests/ticket/bug615.xml \ $(srcdir)/tests/ticket/bug716.xml \ $(srcdir)/tests/ticket/bug837.xml \ + $(srcdir)/tests/ticket/bug838.xml \ $(srcdir)/tests/general/TestBoundary.xml \ $(srcdir)/tests/general/TestBuffer.xml \ $(srcdir)/tests/general/TestBufferMitredJoin.xml \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/tests/xmltester/Makefile.in new/geos-3.7.2/tests/xmltester/Makefile.in --- old/geos-3.7.1/tests/xmltester/Makefile.in 2018-11-30 00:05:20.000000000 +0100 +++ new/geos-3.7.2/tests/xmltester/Makefile.in 2019-05-03 00:29:58.000000000 +0200 @@ -636,6 +636,7 @@ $(srcdir)/tests/ticket/bug615.xml \ $(srcdir)/tests/ticket/bug716.xml \ $(srcdir)/tests/ticket/bug837.xml \ + $(srcdir)/tests/ticket/bug838.xml \ $(srcdir)/tests/general/TestBoundary.xml \ $(srcdir)/tests/general/TestBuffer.xml \ $(srcdir)/tests/general/TestBufferMitredJoin.xml \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/tests/xmltester/tests/general/TestFunctionAA.xml new/geos-3.7.2/tests/xmltester/tests/general/TestFunctionAA.xml --- old/geos-3.7.1/tests/xmltester/tests/general/TestFunctionAA.xml 2018-11-29 23:42:00.000000000 +0100 +++ new/geos-3.7.2/tests/xmltester/tests/general/TestFunctionAA.xml 2019-05-02 18:11:53.000000000 +0200 @@ -33,7 +33,7 @@ <op name="symdifference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (10 10, 10 100, 50 100, 50 50, 100 50, 100 10, 10 10)), + (10 10, 10 100, 50 100, 50 50, 100 50, 100 10, 10 10)), ( (50 100, 50 200, 200 200, 200 50, 100 50, 100 100, 50 100))) </op> @@ -44,7 +44,7 @@ <desc>AA - A with hole intersecting B</desc> <a> POLYGON( - (20 20, 20 160, 160 160, 160 20, 20 20), + (20 20, 20 160, 160 160, 160 20, 20 20), (140 140, 40 140, 40 40, 140 40, 140 140)) </a> <b> @@ -60,14 +60,14 @@ <test> <op name="union" arg1="A" arg2="B"> POLYGON( - (20 20, 20 160, 80 160, 80 240, 220 240, 220 100, 160 100, 160 20, 20 20), + (20 20, 20 160, 80 160, 80 240, 220 240, 220 100, 160 100, 160 20, 20 20), (80 100, 80 140, 40 140, 40 40, 140 40, 140 100, 80 100)) </op> </test> <test> <op name="difference" arg1="A" arg2="B"> POLYGON( - (20 20, 20 160, 80 160, 80 140, 40 140, 40 40, 140 40, 140 100, 160 100, + (20 20, 20 160, 80 160, 80 140, 40 140, 40 40, 140 40, 140 100, 160 100, 160 20, 20 20)) </op> </test> @@ -75,10 +75,10 @@ <op name="symdifference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (20 20, 20 160, 80 160, 80 140, 40 140, 40 40, 140 40, 140 100, 160 100, - 160 20, 20 20)), + (20 20, 20 160, 80 160, 80 140, 40 140, 40 40, 140 40, 140 100, 160 100, + 160 20, 20 20)), ( - (80 100, 80 140, 140 140, 140 100, 80 100)), + (80 100, 80 140, 140 140, 140 100, 80 100)), ( (80 160, 80 240, 220 240, 220 100, 160 100, 160 160, 80 160))) </op> @@ -117,7 +117,7 @@ <op name="symdifference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (20 340, 330 380, 50 40, 28 260, 140 220, 210 320, 140 270, 27 270, 20 340)), + (20 340, 330 380, 50 40, 28 260, 140 220, 210 320, 140 270, 27 270, 20 340)), ( (27 270, 28 260, 0 270, 27 270))) </op> @@ -135,8 +135,8 @@ <test> <op name="intersection" arg1="A" arg2="B"> GEOMETRYCOLLECTION( - POINT(110 260), - LINESTRING(110 0, 110 60), + POINT(110 260), + LINESTRING(110 0, 110 60), POLYGON( (110 100, 40 140, 110 180, 180 140, 110 100))) </op> @@ -144,24 +144,24 @@ <test> <op name="union" arg1="A" arg2="B"> POLYGON( - (110 0, 0 0, 0 260, 110 260, 220 260, 220 0, 110 0), - (110 260, 40 220, 110 180, 180 220, 110 260), + (110 0, 0 0, 0 260, 110 260, 220 260, 220 0, 110 0), + (110 260, 40 220, 110 180, 180 220, 110 260), (110 100, 40 60, 110 60, 180 60, 110 100)) </op> </test> <test> <op name="difference" arg1="A" arg2="B"> POLYGON( - (110 0, 0 0, 0 260, 110 260, 40 220, 110 180, 40 140, 110 100, 40 60, + (110 0, 0 0, 0 260, 110 260, 40 220, 110 180, 40 140, 110 100, 40 60, 110 60, 110 0)) </op> </test> <test> <op name="symdifference" arg1="A" arg2="B"> POLYGON( - (110 0, 0 0, 0 260, 110 260, 220 260, 220 0, 110 0), - (110 260, 40 220, 110 180, 180 220, 110 260), - (110 180, 40 140, 110 100, 180 140, 110 180), + (110 0, 0 0, 0 260, 110 260, 220 260, 220 0, 110 0), + (110 260, 40 220, 110 180, 180 220, 110 260), + (110 180, 40 140, 110 100, 180 140, 110 180), (110 100, 40 60, 110 60, 180 60, 110 100)) </op> </test> @@ -171,19 +171,19 @@ <desc>AA - simple polygons with two touching holes in their symDifference</desc> <a> POLYGON( - (0 0, 120 0, 120 50, 50 50, 120 100, 50 150, 120 150, 120 190, 0 190, + (0 0, 120 0, 120 50, 50 50, 120 100, 50 150, 120 150, 120 190, 0 190, 0 0)) </a> <b> POLYGON( - (230 0, 120 0, 120 50, 190 50, 120 100, 190 150, 120 150, 120 190, 230 190, + (230 0, 120 0, 120 50, 190 50, 120 100, 190 150, 120 150, 120 190, 230 190, 230 0)) </b> <test> <op name="symdifference" arg1="A" arg2="B"> POLYGON( - (120 0, 0 0, 0 190, 120 190, 230 190, 230 0, 120 0), - (120 100, 50 50, 120 50, 190 50, 120 100), + (120 0, 0 0, 0 190, 120 190, 230 190, 230 0, 120 0), + (120 100, 50 50, 120 50, 190 50, 120 100), (120 100, 190 150, 120 150, 50 150, 120 100)) </op> </test> @@ -198,21 +198,21 @@ <b> MULTIPOLYGON( ( - (40 20, 0 0, 20 40, 60 60, 40 20)), + (40 20, 0 0, 20 40, 60 60, 40 20)), ( - (60 90, 60 60, 90 60, 90 90, 60 90)), + (60 90, 60 60, 90 60, 90 90, 60 90)), ( - (70 120, 90 90, 100 120, 70 120)), + (70 120, 90 90, 100 120, 70 120)), ( (120 70, 90 90, 120 100, 120 70))) </b> <test> <op name="symdifference" arg1="A" arg2="B"> POLYGON( - (0 0, 0 230, 210 230, 210 0, 0 0), - (0 0, 40 20, 60 60, 20 40, 0 0), - (60 60, 90 60, 90 90, 60 90, 60 60), - (90 90, 120 70, 120 100, 90 90), + (0 0, 0 230, 210 230, 210 0, 0 0), + (0 0, 40 20, 60 60, 20 40, 0 0), + (60 60, 90 60, 90 90, 60 90, 60 60), + (90 90, 120 70, 120 100, 90 90), (90 90, 100 120, 70 120, 90 90)) </op> </test> @@ -227,7 +227,7 @@ <b> MULTIPOLYGON( ( - (40 20, 0 0, 20 40, 60 60, 40 20)), + (40 20, 0 0, 20 40, 60 60, 40 20)), ( (60 100, 60 60, 100 60, 100 100, 60 100))) </b> @@ -235,7 +235,7 @@ <op name="intersection" arg1="A" arg2="B"> MULTIPOLYGON( ( - (40 20, 0 0, 20 40, 60 60, 40 20)), + (40 20, 0 0, 20 40, 60 60, 40 20)), ( (60 60, 60 100, 100 100, 100 60, 60 60))) </op> @@ -243,8 +243,8 @@ <test> <op name="symdifference" arg1="A" arg2="B"> POLYGON( - (0 0, 0 300, 340 300, 340 0, 0 0), - (0 0, 40 20, 60 60, 20 40, 0 0), + (0 0, 0 300, 340 300, 340 0, 0 0), + (0 0, 40 20, 60 60, 20 40, 0 0), (60 60, 100 60, 100 100, 60 100, 60 60)) </op> </test> @@ -259,7 +259,7 @@ <b> MULTIPOLYGON( ( - (60 20, 0 20, 60 60, 60 20)), + (60 20, 0 20, 60 60, 60 20)), ( (60 100, 60 60, 100 60, 100 100, 60 100))) </b> @@ -267,7 +267,7 @@ <op name="intersection" arg1="A" arg2="B"> MULTIPOLYGON( ( - (60 20, 0 20, 60 60, 60 20)), + (60 20, 0 20, 60 60, 60 20)), ( (60 60, 60 100, 100 100, 100 60, 60 60))) </op> @@ -281,16 +281,16 @@ <test> <op name="difference" arg1="A" arg2="B"> POLYGON( - (0 20, 0 120, 120 120, 120 0, 0 0, 0 20), - (0 20, 60 20, 60 60, 0 20), + (0 20, 0 120, 120 120, 120 0, 0 0, 0 20), + (0 20, 60 20, 60 60, 0 20), (60 60, 100 60, 100 100, 60 100, 60 60)) </op> </test> <test> <op name="symdifference" arg1="A" arg2="B"> POLYGON( - (0 20, 0 120, 120 120, 120 0, 0 0, 0 20), - (0 20, 60 20, 60 60, 0 20), + (0 20, 0 120, 120 120, 120 0, 0 0, 0 20), + (0 20, 60 20, 60 60, 0 20), (60 60, 100 60, 100 100, 60 100, 60 60)) </op> </test> @@ -300,18 +300,18 @@ <desc>AA - simple polygons with holes</desc> <a> POLYGON( - (160 330, 60 260, 20 150, 60 40, 190 20, 270 130, 260 250, 160 330), + (160 330, 60 260, 20 150, 60 40, 190 20, 270 130, 260 250, 160 330), (140 240, 80 190, 90 100, 160 70, 210 130, 210 210, 140 240)) </a> <b> POLYGON( - (300 330, 190 270, 150 170, 150 110, 250 30, 380 50, 380 250, 300 330), + (300 330, 190 270, 150 170, 150 110, 250 30, 380 50, 380 250, 300 330), (290 240, 240 200, 240 110, 290 80, 330 170, 290 240)) </b> <test> <op name="intersection" arg1="A" arg2="B"> POLYGON( - (251 104, 217 57, 176 89, 210 130, 210 210, 172 226, 190 270, 217 285, 260 250, + (251 104, 217 57, 176 89, 210 130, 210 210, 172 226, 190 270, 217 285, 260 250, 263 218, 240 200, 240 110, 251 104)) </op> </test> @@ -319,13 +319,13 @@ <op name="symdifference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (217 57, 190 20, 60 40, 20 150, 60 260, 160 330, 217 285, 190 270, 172 226, - 140 240, 80 190, 90 100, 160 70, 176 89, 217 57)), + (217 57, 190 20, 60 40, 20 150, 60 260, 160 330, 217 285, 190 270, 172 226, + 140 240, 80 190, 90 100, 160 70, 176 89, 217 57)), ( - (217 57, 251 104, 290 80, 330 170, 290 240, 263 218, 260 250, 217 285, 300 330, - 380 250, 380 50, 250 30, 217 57)), + (217 57, 251 104, 290 80, 330 170, 290 240, 263 218, 260 250, 217 285, 300 330, + 380 250, 380 50, 250 30, 217 57)), ( - (263 218, 270 130, 251 104, 240 110, 240 200, 263 218)), + (263 218, 270 130, 251 104, 240 110, 240 200, 263 218)), ( (172 226, 210 210, 210 130, 176 89, 150 110, 150 170, 172 226))) </op> @@ -338,12 +338,12 @@ POLYGON ((20 0, 20 160, 200 160, 200 0, 20 0)) </a> <b> - POLYGON ((220 80, 0 80, 0 240, 220 240, 220 80), + POLYGON ((220 80, 0 80, 0 240, 220 240, 220 80), (100 80, 120 120, 80 120, 100 80)) </b> <test> <op name="intersection" arg1="A" arg2="B"> - POLYGON ((20 80, 20 160, 200 160, 200 80, 100 80, 20 80), + POLYGON ((20 80, 20 160, 200 160, 200 80, 100 80, 20 80), (100 80, 120 120, 80 120, 100 80)) </op> </test> @@ -354,14 +354,14 @@ </test> <test> <op name="difference" arg1="A" arg2="B"> - MULTIPOLYGON (((20 0, 20 80, 100 80, 200 80, 200 0, 20 0)), + MULTIPOLYGON (((20 0, 20 80, 100 80, 200 80, 200 0, 20 0)), ((100 80, 80 120, 120 120, 100 80))) </op> </test> <test> <op name="symdifference" arg1="A" arg2="B"> - MULTIPOLYGON (((20 0, 20 80, 100 80, 200 80, 200 0, 20 0)), - ((200 80, 200 160, 20 160, 20 80, 0 80, 0 240, 220 240, 220 80, 200 80)), + MULTIPOLYGON (((20 0, 20 80, 100 80, 200 80, 200 0, 20 0)), + ((200 80, 200 160, 20 160, 20 80, 0 80, 0 240, 220 240, 220 80, 200 80)), ((100 80, 80 120, 120 120, 100 80))) </op> </test> @@ -372,29 +372,29 @@ <a> MULTIPOLYGON( ( - (120 340, 120 200, 140 200, 140 280, 160 280, 160 200, 180 200, 180 280, 200 280, - 200 200, 220 200, 220 340, 120 340)), + (120 340, 120 200, 140 200, 140 280, 160 280, 160 200, 180 200, 180 280, 200 280, + 200 200, 220 200, 220 340, 120 340)), ( - (360 200, 220 200, 220 180, 300 180, 300 160, 220 160, 220 140, 300 140, 300 120, + (360 200, 220 200, 220 180, 300 180, 300 160, 220 160, 220 140, 300 140, 300 120, 220 120, 220 100, 360 100, 360 200))) </a> <b> MULTIPOLYGON( ( - (100 220, 100 200, 300 200, 300 220, 100 220)), + (100 220, 100 200, 300 200, 300 220, 100 220)), ( - (280 180, 280 160, 300 160, 300 180, 280 180)), + (280 180, 280 160, 300 160, 300 180, 280 180)), ( - (220 140, 220 120, 240 120, 240 140, 220 140)), + (220 140, 220 120, 240 120, 240 140, 220 140)), ( (180 220, 160 240, 200 240, 180 220))) </b> <test> <op name="getboundary" arg1="A"> MULTILINESTRING( - (120 340, 120 200, 140 200, 140 280, 160 280, 160 200, 180 200, 180 280, 200 280, - 200 200, 220 200, 220 340, 120 340), - (360 200, 220 200, 220 180, 300 180, 300 160, 220 160, 220 140, 300 140, 300 120, + (120 340, 120 200, 140 200, 140 280, 160 280, 160 200, 180 200, 180 280, 200 280, + 200 200, 220 200, 220 340, 120 340), + (360 200, 220 200, 220 180, 300 180, 300 160, 220 160, 220 140, 300 140, 300 120, 220 120, 220 100, 360 100, 360 200)) </op> </test> @@ -407,19 +407,19 @@ <test> <op name="intersection" arg1="A" arg2="B"> GEOMETRYCOLLECTION( - POINT(200 240), - LINESTRING(300 200, 220 200), - LINESTRING(280 180, 300 180), - LINESTRING(300 180, 300 160), - LINESTRING(300 160, 280 160), - LINESTRING(220 140, 240 140), - LINESTRING(240 120, 220 120), + POINT(200 240), + LINESTRING(300 200, 220 200), + LINESTRING(280 180, 300 180), + LINESTRING(300 180, 300 160), + LINESTRING(300 160, 280 160), + LINESTRING(220 140, 240 140), + LINESTRING(240 120, 220 120), POLYGON( - (120 200, 120 220, 140 220, 140 200, 120 200)), + (120 200, 120 220, 140 220, 140 200, 120 200)), POLYGON( - (160 200, 160 220, 180 220, 180 200, 160 200)), + (160 200, 160 220, 180 220, 180 200, 160 200)), POLYGON( - (180 240, 180 220, 160 240, 180 240)), + (180 240, 180 220, 160 240, 180 240)), POLYGON( (200 200, 200 220, 220 220, 220 200, 200 200))) </op> @@ -427,12 +427,12 @@ <test> <op name="union" arg1="A" arg2="B"> POLYGON( - (120 220, 120 340, 220 340, 220 220, 300 220, 300 200, 360 200, 360 100, 220 100, - 220 120, 220 140, 220 160, 280 160, 280 180, 220 180, 220 200, 200 200, 180 200, 160 200, - 140 200, 120 200, 100 200, 100 220, 120 220), - (200 240, 200 280, 180 280, 180 240, 200 240), - (200 240, 180 220, 200 220, 200 240), - (160 240, 160 280, 140 280, 140 220, 160 220, 160 240), + (120 220, 120 340, 220 340, 220 220, 300 220, 300 200, 360 200, 360 100, 220 100, + 220 120, 220 140, 220 160, 280 160, 280 180, 220 180, 220 200, 200 200, 180 200, 160 200, + 140 200, 120 200, 100 200, 100 220, 120 220), + (200 240, 200 280, 180 280, 180 240, 200 240), + (200 240, 180 220, 200 220, 200 240), + (160 240, 160 280, 140 280, 140 220, 160 220, 160 240), (240 120, 300 120, 300 140, 240 140, 240 120)) </op> </test> @@ -440,12 +440,12 @@ <op name="difference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (120 220, 120 340, 220 340, 220 220, 200 220, 200 240, 200 280, 180 280, 180 240, - 160 240, 160 280, 140 280, 140 220, 120 220)), + (120 220, 120 340, 220 340, 220 220, 200 220, 200 240, 200 280, 180 280, 180 240, + 160 240, 160 280, 140 280, 140 220, 120 220)), ( - (160 220, 160 240, 180 220, 160 220)), + (160 220, 160 240, 180 220, 160 220)), ( - (300 200, 360 200, 360 100, 220 100, 220 120, 240 120, 300 120, 300 140, 240 140, + (300 200, 360 200, 360 100, 220 100, 220 120, 240 120, 300 120, 300 140, 240 140, 220 140, 220 160, 280 160, 300 160, 300 180, 280 180, 220 180, 220 200, 300 200))) </op> </test> @@ -453,21 +453,21 @@ <op name="symdifference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (120 220, 120 340, 220 340, 220 220, 200 220, 200 240, 200 280, 180 280, 180 240, - 160 240, 160 280, 140 280, 140 220, 120 220)), + (120 220, 120 340, 220 340, 220 220, 200 220, 200 240, 200 280, 180 280, 180 240, + 160 240, 160 280, 140 280, 140 220, 120 220)), ( - (120 220, 120 200, 100 200, 100 220, 120 220)), + (120 220, 120 200, 100 200, 100 220, 120 220)), ( - (140 200, 140 220, 160 220, 160 200, 140 200)), + (140 200, 140 220, 160 220, 160 200, 140 200)), ( - (160 220, 160 240, 180 220, 160 220)), + (160 220, 160 240, 180 220, 160 220)), ( - (180 200, 180 220, 200 220, 200 200, 180 200)), + (180 200, 180 220, 200 220, 200 200, 180 200)), ( - (180 220, 180 240, 200 240, 180 220)), + (180 220, 180 240, 200 240, 180 220)), ( - (220 200, 220 220, 300 220, 300 200, 360 200, 360 100, 220 100, 220 120, 220 140, - 220 160, 280 160, 280 180, 220 180, 220 200), + (220 200, 220 220, 300 220, 300 200, 360 200, 360 100, 220 100, 220 120, 220 140, + 220 160, 280 160, 280 180, 220 180, 220 200), (240 120, 300 120, 300 140, 240 140, 240 120))) </op> </test> @@ -478,31 +478,31 @@ <a> MULTIPOLYGON( ( - (100 200, 100 180, 120 180, 120 200, 100 200)), + (100 200, 100 180, 120 180, 120 200, 100 200)), ( - (60 240, 60 140, 220 140, 220 160, 160 160, 160 180, 200 180, 200 200, 160 200, - 160 220, 220 220, 220 240, 60 240), - (80 220, 80 160, 140 160, 140 220, 80 220)), + (60 240, 60 140, 220 140, 220 160, 160 160, 160 180, 200 180, 200 200, 160 200, + 160 220, 220 220, 220 240, 60 240), + (80 220, 80 160, 140 160, 140 220, 80 220)), ( (280 220, 240 180, 260 160, 300 200, 280 220))) </a> <b> MULTIPOLYGON( ( - (80 220, 80 160, 140 160, 140 220, 80 220), - (100 200, 100 180, 120 180, 120 200, 100 200)), + (80 220, 80 160, 140 160, 140 220, 80 220), + (100 200, 100 180, 120 180, 120 200, 100 200)), ( - (220 240, 220 220, 160 220, 160 200, 220 200, 220 180, 160 180, 160 160, 220 160, - 220 140, 320 140, 320 240, 220 240), + (220 240, 220 220, 160 220, 160 200, 220 200, 220 180, 160 180, 160 160, 220 160, + 220 140, 320 140, 320 240, 220 240), (240 220, 240 160, 300 160, 300 220, 240 220))) </b> <test> <op name="getboundary" arg1="A"> MULTILINESTRING( - (100 200, 100 180, 120 180, 120 200, 100 200), - (60 240, 60 140, 220 140, 220 160, 160 160, 160 180, 200 180, 200 200, 160 200, - 160 220, 220 220, 220 240, 60 240), - (80 220, 80 160, 140 160, 140 220, 80 220), + (100 200, 100 180, 120 180, 120 200, 100 200), + (60 240, 60 140, 220 140, 220 160, 160 160, 160 180, 200 180, 200 200, 160 200, + 160 220, 220 220, 220 240, 60 240), + (80 220, 80 160, 140 160, 140 220, 80 220), (280 220, 240 180, 260 160, 300 200, 280 220)) </op> </test> @@ -515,25 +515,25 @@ <test> <op name="intersection" arg1="A" arg2="B"> GEOMETRYCOLLECTION( - POINT(240 180), - POINT(260 160), - POINT(280 220), - POINT(300 200), - LINESTRING(100 200, 100 180), - LINESTRING(100 180, 120 180), - LINESTRING(120 180, 120 200), - LINESTRING(120 200, 100 200), - LINESTRING(220 140, 220 160), - LINESTRING(220 160, 160 160), - LINESTRING(160 160, 160 180), - LINESTRING(160 180, 200 180), - LINESTRING(200 200, 160 200), - LINESTRING(160 200, 160 220), - LINESTRING(160 220, 220 220), - LINESTRING(220 220, 220 240), - LINESTRING(80 220, 80 160), - LINESTRING(80 160, 140 160), - LINESTRING(140 160, 140 220), + POINT(240 180), + POINT(260 160), + POINT(280 220), + POINT(300 200), + LINESTRING(100 200, 100 180), + LINESTRING(100 180, 120 180), + LINESTRING(120 180, 120 200), + LINESTRING(120 200, 100 200), + LINESTRING(220 140, 220 160), + LINESTRING(220 160, 160 160), + LINESTRING(160 160, 160 180), + LINESTRING(160 180, 200 180), + LINESTRING(200 200, 160 200), + LINESTRING(160 200, 160 220), + LINESTRING(160 220, 220 220), + LINESTRING(220 220, 220 240), + LINESTRING(80 220, 80 160), + LINESTRING(80 160, 140 160), + LINESTRING(140 160, 140 220), LINESTRING(140 220, 80 220)) </op> </test> @@ -541,9 +541,9 @@ <op name="union" arg1="A" arg2="B"> MULTIPOLYGON( ( - (220 140, 60 140, 60 240, 220 240, 320 240, 320 140, 220 140), - (200 200, 200 180, 220 180, 220 200, 200 200), - (240 220, 240 180, 240 160, 260 160, 300 160, 300 200, 300 220, 280 220, 240 220)), + (220 140, 60 140, 60 240, 220 240, 320 240, 320 140, 220 140), + (200 200, 200 180, 220 180, 220 200, 200 200), + (240 220, 240 180, 240 160, 260 160, 300 160, 300 200, 300 220, 280 220, 240 220)), ( (240 180, 280 220, 300 200, 260 160, 240 180))) </op> @@ -552,11 +552,11 @@ <op name="difference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (100 180, 100 200, 120 200, 120 180, 100 180)), + (100 180, 100 200, 120 200, 120 180, 100 180)), ( - (220 140, 60 140, 60 240, 220 240, 220 220, 160 220, 160 200, 200 200, 200 180, - 160 180, 160 160, 220 160, 220 140), - (80 220, 80 160, 140 160, 140 220, 80 220)), + (220 140, 60 140, 60 240, 220 240, 220 220, 160 220, 160 200, 200 200, 200 180, + 160 180, 160 160, 220 160, 220 140), + (80 220, 80 160, 140 160, 140 220, 80 220)), ( (240 180, 280 220, 300 200, 260 160, 240 180))) </op> @@ -565,9 +565,9 @@ <op name="symdifference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (220 140, 60 140, 60 240, 220 240, 320 240, 320 140, 220 140), - (200 200, 200 180, 220 180, 220 200, 200 200), - (240 220, 240 180, 240 160, 260 160, 300 160, 300 200, 300 220, 280 220, 240 220)), + (220 140, 60 140, 60 240, 220 240, 320 240, 320 140, 220 140), + (200 200, 200 180, 220 180, 220 200, 200 200), + (240 220, 240 180, 240 160, 260 160, 300 160, 300 200, 300 220, 280 220, 240 220)), ( (240 180, 280 220, 300 200, 260 160, 240 180))) </op> @@ -582,7 +582,7 @@ </a> <b> POLYGON( - (160 160, 100 160, 100 100, 160 100, 160 160), + (160 160, 100 160, 100 100, 160 100, 160 160), (140 140, 120 140, 120 120, 140 120, 140 140)) </b> <test> @@ -599,7 +599,7 @@ <test> <op name="intersection" arg1="A" arg2="B"> GEOMETRYCOLLECTION( - LINESTRING(140 140, 140 120), + LINESTRING(140 140, 140 120), POLYGON( (100 160, 140 160, 140 140, 120 140, 120 120, 140 120, 140 100, 100 100, 100 160))) </op> @@ -614,7 +614,7 @@ <op name="difference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (60 160, 100 160, 100 100, 140 100, 140 60, 60 60, 60 160)), + (60 160, 100 160, 100 100, 140 100, 140 60, 60 60, 60 160)), ( (140 140, 140 120, 120 120, 120 140, 140 140))) </op> @@ -623,11 +623,42 @@ <op name="symdifference" arg1="A" arg2="B"> MULTIPOLYGON( ( - (60 160, 100 160, 100 100, 140 100, 140 60, 60 60, 60 160)), + (60 160, 100 160, 100 100, 140 100, 140 60, 60 60, 60 160)), ( (140 140, 140 160, 160 160, 160 100, 140 100, 140 120, 120 120, 120 140, 140 140))) </op> </test> </case> +<case> + <desc>AA - Polygons which stress hole assignment</desc> + <a> +POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0), (1 1, 1 2, 2 1, 1 1), (1 2, 1 3, 2 3, 1 2), (2 3, 3 3, 3 2, 2 3)) + </a> + <b> +POLYGON ((2 1, 3 1, 3 2, 2 1)) + </b> +<test> + <op name="intersection" arg1="A" arg2="B"> +POLYGON ((3 2, 3 1, 2 1, 3 2)) + </op> +</test> +<test> + <op name="union" arg1="A" arg2="B"> +POLYGON ((0 0, 0 4, 4 4, 4 0, 0 0), (1 2, 1 1, 2 1, 1 2), (1 2, 2 3, 1 3, 1 2), (2 3, 3 2, 3 3, 2 3)) + </op> +</test> +<test> + <op name="difference" arg1="A" arg2="B"> +MULTIPOLYGON (((0 0, 0 4, 4 4, 4 0, 0 0), (1 2, 1 1, 2 1, 3 1, 3 2, 3 3, 2 3, 1 3, 1 2)), ((2 1, 1 2, 2 3, 3 2, 2 1))) + </op> +</test> +<test> + <op name="symdifference" arg1="A" arg2="B"> +MULTIPOLYGON (((0 0, 0 4, 4 4, 4 0, 0 0), (1 2, 1 1, 2 1, 3 1, 3 2, 3 3, 2 3, 1 3, 1 2)), ((2 1, 1 2, 2 3, 3 2, 2 1))) + </op> +</test> +</case> + + </run> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/geos-3.7.1/tests/xmltester/tests/ticket/bug838.xml new/geos-3.7.2/tests/xmltester/tests/ticket/bug838.xml --- old/geos-3.7.1/tests/xmltester/tests/ticket/bug838.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/geos-3.7.2/tests/xmltester/tests/ticket/bug838.xml 2019-05-02 18:11:53.000000000 +0200 @@ -0,0 +1,20 @@ +<run> +<precisionModel type="FLOATING" /> +<case> +<desc> +Union of two valid polygons resulting in an invalid geometry +See https://trac.osgeo.org/geos/ticket/838 +</desc> +<a> +00000000060000000200000000030000000100000005412CD75B00000000413D8F0966666667412CD75933333333413D8F6D80000000412CD82166666667413D8F6E4CCCCCCD412CD82500000000413D8EA61999999A412CD75B00000000413D8F096666666700000000030000000100000005412CD82500000001413D8EA61999999A412CD82333333334413D8F0A33333333412CD8EB66666666413D8F0B19999999412CD8ED33333333413D8EA700000001412CD82500000001413D8EA61999999A +</a> +<b> +00000000030000000100000007412CD9D4D50CE8F7413D8EA7FBC39C12412CD8ED33333333413D8EA700000000412CD8EB66666667413D8F0B1999999A412CD82333333333413D8F0A33333333412CD82166666667413D8F6E4CCCCCCD412CD9B1CCCCCCCD413D8F701999999A412CD9D4D50CE8F7413D8EA7FBC39C12 +</b> +<test> + <op name="union" arg1="A" arg2="B"> +0103000000010000000A000000000000005BD72C4167666666098F3D413333333359D72C41000000806D8F3D416766666621D82C41CDCCCC4C6E8F3D41CDCCCCCCB1D92C419A999919708F3D41F7E80CD5D4D92C41129CC3FBA78E3D4133333333EDD82C4100000000A78E3D410100000025D82C419A999919A68E3D413333333323D82C41333333330A8F3D410000000025D82C419A999919A68E3D41000000005BD72C4167666666098F3D41 + </op> +</test> +</case> +</run>
