[Git][debian-gis-team/geos][upstream] New upstream version 3.7.2

Bas Couwenberg gitlab at salsa.debian.org
Fri May 3 05:56:27 BST 2019



Bas Couwenberg pushed to branch upstream at Debian GIS Project / geos


Commits:
541310cc by Bas Couwenberg at 2019-05-03T04:05:52Z
New upstream version 3.7.2
- - - - -


24 changed files:

- CMakeLists.txt
- ChangeLog
- NEWS
- README.md
- aclocal.m4
- capi/CMakeLists.txt
- capi/geos_c.h
- capi/geos_c.h.in
- configure
- configure.ac
- doc/Doxyfile
- geos_revision.h
- − include/geos/geom/._CoordinateArraySequenceFactory.inl
- include/geos/version.h.vc
- src/CMakeLists.txt
- src/geom/Envelope.cpp
- src/noding/SingleInteriorIntersectionFinder.cpp
- src/operation/overlay/PolygonBuilder.cpp
- swig/geos.i
- tests/xmltester/CMakeLists.txt
- tests/xmltester/Makefile.am
- tests/xmltester/Makefile.in
- tests/xmltester/tests/general/TestFunctionAA.xml
- + tests/xmltester/tests/ticket/bug838.xml


Changes:

=====================================
CMakeLists.txt
=====================================
@@ -23,7 +23,7 @@ endif()
 #################################################################################
 # 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 @@ message(STATUS "Setting GEOS version ${VERSION} as port of JTS ${JTS_PORT}")
 
 # 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}")


=====================================
ChangeLog
=====================================
@@ -1,3 +1,79 @@
+2019-05-02  Paul Ramsey <pramsey at cleverelephant.ca>
+
+	* NEWS: Set date for 3.7.2 release
+
+2019-02-04  Regina Obe <lr at pcorp.us>
+
+	* HOWTO_RELEASE, README.md: Update instructions to include updating
+	the readme.  Fix some old bot links
+
+2019-02-04  Regina Obe <lr at pcorp.us>
+
+	Merge branch '3.7' of https://git.osgeo.org/gitea/geos/geos into
+	3.7
+
+2019-02-04  Regina Obe <lr at pcorp.us>
+
+	* .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 <pramsey at cleverelephant.ca>
+
+	* 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 <pramsey at cleverelephant.ca>
+
+	* 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 <pramsey at cleverelephant.ca>
+
+	* NEWS, capi/CMakeLists.txt, src/CMakeLists.txt: fail with cmake
+	-DGEOS_ENABLE_MACOSX_FRAMEWORK=NO Closes #936
+
+2019-01-25  Paul Ramsey <pramsey at cleverelephant.ca>
+
+	* src/geom/Envelope.cpp: Convert from nullptr to NULL
+
+2019-01-25  Paul Ramsey <pramsey at cleverelephant.ca>
+
+	* NEWS: Update news
+
+2019-01-25  Paul Ramsey <pramsey at cleverelephant.ca>
+
+	* src/geom/Envelope.cpp: Change Envelope constructor to use strtod
+	References #875
+
+2018-12-21  Regina Obe <lr at pcorp.us>
+
+	Merge branch '3.7' of https://git.osgeo.org/gitea/geos/geos into
+	3.7
+
+2018-12-20  Paul Ramsey <pramsey at cleverelephant.ca>
+
+	* CMakeLists.txt: Remove 'dev' suffix from patch number
+
+2018-12-20  Regina Obe <regina.obe at appsassociates.com>
+
+	* configure.ac: Change version to 3.7.2dev from 3.7.2
+
+2018-12-08  Regina Obe <lr at pcorp.us>
+
+	* CMakeLists.txt, include/geos/version.h.vc: More version number
+	updates
+
+2018-12-08  Regina Obe <lr at pcorp.us>
+
+	* CMakeLists.txt, capi/geos_c.h.in: Increment to GEOS 3.7.2
+
+2018-11-29  Paul Ramsey <pramsey at cleverelephant.ca>
+
+	* NEWS, configure.ac: Bump versions for next dev cycle
+
 2018-11-29  Paul Ramsey <pramsey at cleverelephant.ca>
 
 	* NEWS, configure.ac: News and version bump for 3.7.1


=====================================
NEWS
=====================================
@@ -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
 


=====================================
README.md
=====================================
@@ -7,8 +7,8 @@ Project homepage: http://geos.osgeo.org/
 
 | 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) |
+| 3.7      | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_3.7)](https://debbie.postgis.net/view/GEOS/job/GEOS_3.7/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_3.7/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_3.7/) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?ref=refs/heads/3.7)](https://drone.osgeo.org/geos/geos?branch=3.7) | [![travis](https://travis-ci.com/libgeos/geos.svg?branch=3.7)](https://travis-ci.com/libgeos/geos?branch=3.7) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.7/build.svg)](https://gitlab.com/geos/libgeos/commits/3.7) | [![appveyor](https://ci.appveyor.com/api/projects/status/ao909hwpsb1yu062/branch/3.7?svg=true)](https://ci.appveyor.com/project/OSGeo/geos/branch/3.7) | [![bessie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Worker_Run/label=bessie&BRANCH=3.7)](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=3.7)](https://debbie.postgis.net/view/GEOS/job/GEOS_Worker_Run/label=bessie32) ||
+| 3.7     | [![debbie](https://debbie.postgis.net/buildStatus/icon?job=GEOS_Branch_3.7)](https://debbie.postgis.net/view/GEOS/job/GEOS_Branch_3.7/) | [![winnie](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.7/badge/icon)](https://winnie.postgis.net:444/view/GEOS/job/GEOS_Branch_3.7/) | [![dronie](https://dronie.osgeo.org/api/badges/geos/geos/status.svg?ref=refs/heads/3.7)](https://dronie.osgeo.org/geos/geos?branch=3.7) | [![travis](https://travis-ci.com/libgeos/geos.svg?branch=3.7)](https://travis-ci.com/libgeos/geos?branch=3.7) | [![gitlab-ci](https://gitlab.com/geos/libgeos/badges/3.7/build.svg)](https://gitlab.com/geos/libgeos/commits/3.7) | [![appveyor](https://ci.appveyor.com/api/projects/status/ao909hwpsb1yu062/branch/3.7?svg=true)](https://ci.appveyor.com/project/OSGeo/geos/branch/3.7) |
 
 More on: https://trac.osgeo.org/geos#BuildandInstall
 
@@ -105,7 +105,7 @@ when configuring:
 
     ./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


=====================================
aclocal.m4
=====================================
@@ -20,6 +20,44 @@ 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'.])])
 
+# ===========================================================================
+#    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 <vapier at gentoo.org>
+#
+#   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


=====================================
capi/CMakeLists.txt
=====================================
@@ -40,9 +40,10 @@ if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
       CLEAN_DIRECT_OUTPUT 1)
   endif()
 
+  add_dependencies(geos_c geos_revision)
+
 endif()
 
-add_dependencies(geos_c geos_revision)
 
 #################################################################################
 # Installation


=====================================
capi/geos_c.h
=====================================
@@ -61,7 +61,7 @@ extern "C" {
 #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 @@ extern "C" {
 #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 @@ extern "C" {
 
 #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


=====================================
capi/geos_c.h.in
=====================================
@@ -61,7 +61,7 @@ extern "C" {
 #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@


=====================================
configure
=====================================
@@ -2615,12 +2615,12 @@ test -n "$target_alias" &&
 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/'`
 


=====================================
configure.ac
=====================================
@@ -15,7 +15,7 @@ JTS_PORT=1.13.0
 
 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 -- encoding ABI break at every release
 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/'`
 


=====================================
doc/Doxyfile
=====================================
@@ -23,7 +23,7 @@ PROJECT_NAME           =  GEOS
 # 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 @@ WARN_LOGFILE           =
 # 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 


=====================================
geos_revision.h
=====================================
@@ -1 +1 @@
-#define GEOS_REVISION "27a5e771"
+#define GEOS_REVISION "b55d2125"


=====================================
include/geos/geom/._CoordinateArraySequenceFactory.inl deleted
=====================================
Binary files a/include/geos/geom/._CoordinateArraySequenceFactory.inl and /dev/null differ


=====================================
include/geos/version.h.vc
=====================================
@@ -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


=====================================
src/CMakeLists.txt
=====================================
@@ -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 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK)
 
   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}"


=====================================
src/geom/Envelope.cpp
=====================================
@@ -140,10 +140,10 @@ Envelope::Envelope(const string &str)
   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*/


=====================================
src/noding/SingleInteriorIntersectionFinder.cpp
=====================================
@@ -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 @@ SingleInteriorIntersectionFinder::processIntersections(
 	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);
+	bool isProperInteriorInt = li.hasIntersection() &&
+	                           li.isInteriorIntersection();
+	bool isEndInteriorInt = (e0 != e1) && isEndInteriorIntersection(
+	         p00, p01, p10, p11, isEnd00, isEnd01, isEnd10, isEnd11);
 
-	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);
-		}
+	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);
 	}
+
 }
 
 


=====================================
src/operation/overlay/PolygonBuilder.cpp
=====================================
@@ -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::geomgraph;
 using namespace geos::algorithm;
 using namespace geos::geom;
 
-
 namespace geos {
 namespace operation { // geos.operation
 namespace overlay { // geos.operation.overlay
@@ -146,9 +146,9 @@ PolygonBuilder::buildMaximalEdgeRings(const vector<DirectedEdge*> *dirEdges,
 		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 @@ PolygonBuilder::placeFreeHoles(std::vector<EdgeRing*>& newShellList,
 				{
 					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 @@ PolygonBuilder::findEdgeRingContaining(EdgeRing *testEr,
 {
 	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();
 			}
 		}
 	}


=====================================
swig/geos.i
=====================================
@@ -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 @@ const char *GEOSversion();
 
 
 #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
 
 


=====================================
tests/xmltester/CMakeLists.txt
=====================================
@@ -62,6 +62,7 @@ if(GEOS_ENABLE_TESTS)
     ${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


=====================================
tests/xmltester/Makefile.am
=====================================
@@ -44,6 +44,7 @@ SAFE_XMLTESTS=$(srcdir)/tests/testLeaksBig.xml \
 	$(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 \


=====================================
tests/xmltester/Makefile.in
=====================================
@@ -636,6 +636,7 @@ SAFE_XMLTESTS = $(srcdir)/tests/testLeaksBig.xml \
 	$(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 \


=====================================
tests/xmltester/tests/general/TestFunctionAA.xml
=====================================
@@ -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>


=====================================
tests/xmltester/tests/ticket/bug838.xml
=====================================
@@ -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>



View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/commit/541310ccedbcdc33e5b12bc8479db0d67a2fbf32

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/commit/541310ccedbcdc33e5b12bc8479db0d67a2fbf32
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190503/d737edcc/attachment-0001.html>


More information about the Pkg-grass-devel mailing list