[Git][debian-gis-team/geos][experimental] 4 commits: New upstream version 3.7.0~rc1

Bas Couwenberg gitlab at salsa.debian.org
Sun Aug 19 14:56:58 BST 2018


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


Commits:
39a8300c by Bas Couwenberg at 2018-08-19T12:29:22Z
New upstream version 3.7.0~rc1
- - - - -
e8122e23 by Bas Couwenberg at 2018-08-19T12:29:30Z
Merge tag 'upstream/3.7.0_rc1' into experimental

Upstream version 3.7.0~rc1

- - - - -
0d3c0e9a by Bas Couwenberg at 2018-08-19T12:29:55Z
New upstream release candidate.

- - - - -
fdf62fc8 by Bas Couwenberg at 2018-08-19T12:31:07Z
Set distribution to experimental.

- - - - -


23 changed files:

- CMakeLists.txt
- ChangeLog
- NEWS
- capi/CMakeLists.txt
- capi/geos_c.h
- configure
- configure.ac
- debian/changelog
- doc/Doxyfile
- geos_revision.h
- include/geos/algorithm/PointLocator.h
- src/CMakeLists.txt
- src/algorithm/PointLocator.cpp
- src/geom/CoordinateArraySequence.cpp
- src/geomgraph/EdgeEndStar.cpp
- src/index/strtree/AbstractSTRtree.cpp
- src/noding/GeometryNoder.cpp
- src/operation/buffer/SubgraphDepthLocater.cpp
- src/operation/linemerge/LineSequencer.cpp
- src/operation/overlay/LineBuilder.cpp
- swig/geos.i
- tests/unit/capi/GEOSIntersectsTest.cpp
- tests/unit/capi/GEOSSTRtreeTest.cpp


Changes:

=====================================
CMakeLists.txt
=====================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,7 +43,6 @@ message(STATUS "Setting C++ requirement to C++${CMAKE_CXX_STANDARD}")
 
 # GEOS release version
 # GEOS C++ library SONAME will use these encoding ABI break at every release
-set(GEOS_VERSION_PATCH "${GEOS_VERSION_PATCH}dev")
 set(GEOS_VERSION "${GEOS_VERSION_MAJOR}.${GEOS_VERSION_MINOR}.${GEOS_VERSION_PATCH}")
 set(VERSION "${GEOS_VERSION}")
 


=====================================
ChangeLog
=====================================
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,53 @@
+2018-08-19  Regina Obe <lr at pcorp.us>
+
+	* NEWS, configure.ac: Prepping for geos 3.7.0rc1 release
+
+2018-08-19  Regina Obe <lr at pcorp.us>
+
+	* capi/CMakeLists.txt, src/CMakeLists.txt: Allow building C API as
+	static lib for CMake. References #878 for GEOS 3.7.0, closes
+	https://github.com/libgeos/geos/pull/102
+
+2018-08-18  Regina Obe <lr at pcorp.us>
+
+	* CMakeLists.txt: Revert change in #914 cause breaks travis and
+	winnie
+
+2018-08-18  Daniel Baston <dbaston at gmail.com>
+
+	* : commit 3db733ddd1b6c4c407561023291cd648741ea79d Merge: 195dba53
+	1e66be58 Author: Regina Obe <lr at pcorp.us> Date:   Fri Aug 17
+	22:52:49 2018 -0400
+
+2018-08-17  Regina Obe <lr at pcorp.us>
+
+	* CMakeLists.txt: Take out the C++11 enforcement causing issue with
+	finite - see #914. Also take out dev from pathc, its already in
+	there
+
+2018-08-13  Daniel Baston <dbaston at gmail.com>
+
+	* src/index/strtree/AbstractSTRtree.cpp,
+	tests/unit/capi/GEOSSTRtreeTest.cpp: Avoid segfault when querying
+	empty tree Closes #730 Closes https://github.com/libgeos/geos/pull/116
+
+2018-08-13  Daniel Baston <dbaston at gmail.com>
+
+	* : commit 1fc7f585ed822ebbb685ba848f9537691d864697 Author: Daniel
+	Baston <dbaston at gmail.com> Date:   Tue Aug 7 21:36:39 2018 -0400
+
+2018-08-07  Daniel Baston <dbaston at gmail.com>
+
+	* include/geos/algorithm/PointLocator.h,
+	src/algorithm/PointLocator.cpp,
+	tests/unit/capi/GEOSIntersectsTest.cpp: Fix predicate crash with
+	empty collection components Fixes #782 Closes https://github.com/libgeos/geos/pull/114
+
+2018-08-06  Kurt Schwehr <schwehr at google.com>
+
+	* : commit c05ad7552dab1b8a9e49bc974a9f557c4c451350 Author: Kurt
+	Schwehr <schwehr at google.com> Date:   Mon Aug 6 11:19:59 2018 -0700
+
 2018-08-06  Regina Obe <lr at pcorp.us>
 
 	* NEWS, tests/perf/Makefile.am, tests/perf/capi/Makefile.am,


=====================================
NEWS
=====================================
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,16 @@
+Changes in 3.7.0rc1
+2018-08-19
+Fixes / enhancements since 3.7.0beta2
+  - Avoid segfault when querying empty tree (#730, framm)
+  - Collection with Empty components crashes overlay (#782, Dan Baston)
+  - Allow static library with C API for CMake builds (#878, Dakota Hawkins)
+
+
 Changes in 3.7.0beta2
 2018-08-06
 Fixes since 3.7.0beta1
   - Fix infinite loop in GEOSClipByRect (#865, Dan Baston)
-  - Make GEOSException inherit from std::runtime_error 
+  - Make GEOSException inherit from std::runtime_error
     to address clang warnings (Dan Baston)
   - Add missing CMake files to tarball (#895, Regina Obe)
 


=====================================
capi/CMakeLists.txt
=====================================
--- a/capi/CMakeLists.txt
+++ b/capi/CMakeLists.txt
@@ -21,8 +21,8 @@ set(geos_c_SOURCES
 
 file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group issue
 
-if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
-  # if building OS X framework, CAPI built into C++ library
+if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
+  # if building OS X framework or only building static libs, CAPI built into C++ library
   add_library(geos_c SHARED ${geos_c_SOURCES})
 
   target_link_libraries(geos_c geos)
@@ -57,7 +57,7 @@ else()
     DESTINATION include)
 endif()
 
-if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
+if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
   install(TARGETS geos_c
     RUNTIME DESTINATION bin
     LIBRARY DESTINATION lib


=====================================
capi/geos_c.h
=====================================
--- a/capi/geos_c.h
+++ b/capi/geos_c.h
@@ -70,10 +70,10 @@ extern "C" {
 #define GEOS_VERSION_MINOR 7
 #endif
 #ifndef GEOS_VERSION_PATCH
-#define GEOS_VERSION_PATCH 0beta2
+#define GEOS_VERSION_PATCH 0rc1
 #endif
 #ifndef GEOS_VERSION
-#define GEOS_VERSION "3.7.0beta2"
+#define GEOS_VERSION "3.7.0rc1"
 #endif
 #ifndef GEOS_JTS_PORT
 #define GEOS_JTS_PORT "1.13.0"
@@ -82,7 +82,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.0beta2-CAPI-1.11.0"
+#define GEOS_CAPI_VERSION "3.7.0rc1-CAPI-1.11.0"
 #endif
 
 #define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR


=====================================
configure
=====================================
--- a/configure
+++ b/configure
@@ -2632,7 +2632,7 @@ CAPI_INTERFACE_AGE=11
 
 VERSION_MAJOR=3
 VERSION_MINOR=7
-VERSION_PATCH=0beta2
+VERSION_PATCH=0rc1
 VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
 VERSION_RELEASE=`echo "$VERSION" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*?$/\1/'`
 


=====================================
configure.ac
=====================================
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ dnl -- encoding ABI break at every release
 dnl
 VERSION_MAJOR=3
 VERSION_MINOR=7
-VERSION_PATCH=0beta2
+VERSION_PATCH=0rc1
 VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"
 VERSION_RELEASE=`echo "$VERSION" | sed -E 's/^([[0-9]+\.[0-9]+\.[0-9]+]).*?$/\1/'`
 


=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+geos (3.7.0~rc1-1~exp1) experimental; urgency=medium
+
+  * New upstream release candidate.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 19 Aug 2018 14:30:47 +0200
+
 geos (3.7.0~beta2-1~exp1) experimental; urgency=medium
 
   * New upstream beta release.


=====================================
doc/Doxyfile
=====================================
--- a/doc/Doxyfile
+++ b/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.0beta2
+PROJECT_NUMBER         = 3.7.0rc1
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 


=====================================
geos_revision.h
=====================================
--- a/geos_revision.h
+++ b/geos_revision.h
@@ -1 +1 @@
-#define GEOS_REVISION "e7d54545"
+#define GEOS_REVISION "49f66217"


=====================================
include/geos/algorithm/PointLocator.h
=====================================
--- a/include/geos/algorithm/PointLocator.h
+++ b/include/geos/algorithm/PointLocator.h
@@ -13,7 +13,7 @@
  *
  **********************************************************************
  *
- * Last port: algorithm/PointLocator.java r320 (JTS-1.12)
+ * Last port: algorithm/PointLocator.java 95fbe34b (JTS-1.15.2-SNAPSHOT)
  *
  **********************************************************************/
 
@@ -51,9 +51,8 @@ namespace algorithm { // geos::algorithm
  * Notes:
  *	- instances of this class are not reentrant.
  *	- LinearRing objects do not enclose any area
- *	  points inside the ring are still in the EXTERIOR of the ring.
+ *	  (points inside the ring are still in the EXTERIOR of the ring.)
  *
- * Last port: algorithm/PointLocator.java rev. 1.26 (JTS-1.7+)
  */
 class GEOS_DLL PointLocator {
 public:
@@ -62,11 +61,9 @@ public:
 
 	/**
 	 * Computes the topological relationship (Location) of a single point
-	 * to a Geometry.
-	 * It handles both single-element
-	 * and multi-element Geometries.
-	 * The algorithm for multi-part Geometries
-	 * takes into account the boundaryDetermination rule.
+	 * to a Geometry. It handles both single-element and multi-element Geometries.
+	 * The algorithm for multi-part Geometriestakes into account the SFS
+	 * Boundary Determination rule.
 	 *
 	 * @return the Location of the point relative to the input Geometry
 	 */


=====================================
src/CMakeLists.txt
=====================================
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,15 +14,16 @@
 file(GLOB_RECURSE geos_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
 file(GLOB_RECURSE geos_ALL_HEADERS ${CMAKE_SOURCE_DIR}/include/*.h) # fix source_group issue
 
+# Include CAPI in OS X framework binary and in static libs
+set(geos_c_SOURCES
+  ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_c.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_ts_c.cpp)
+
 if(GEOS_ENABLE_MACOSX_FRAMEWORK)
   # OS X frameworks don't have static libs
   # also 1 binary, so include CAPI here
   # and, make name all caps
 
-  set(geos_c_SOURCES
-    ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_c.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_ts_c.cpp)
-
   add_library(GEOS SHARED ${geos_SOURCES} ${geos_c_SOURCES})
 
   math(EXPR CVERSION "${VERSION_MAJOR} + 1") 
@@ -77,7 +78,8 @@ else()
   endif()
 
   if(GEOS_BUILD_STATIC)
-    add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
+    file(GLOB geos_capi_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../capi/*.h) # fix source_group issue
+    add_library(geos-static STATIC ${geos_SOURCES} ${geos_c_SOURCES} ${geos_ALL_HEADERS} ${geos_capi_HEADERS})
 
     set_target_properties(geos-static
       PROPERTIES
@@ -85,6 +87,8 @@ else()
       PREFIX "lib"
       CLEAN_DIRECT_OUTPUT 1)
 
+    add_dependencies(geos-static geos_revision)
+
     install(TARGETS geos-static
       RUNTIME DESTINATION bin
       LIBRARY DESTINATION lib


=====================================
src/algorithm/PointLocator.cpp
=====================================
--- a/src/algorithm/PointLocator.cpp
+++ b/src/algorithm/PointLocator.cpp
@@ -13,7 +13,7 @@
  *
  **********************************************************************
  *
- * Last port: algorithm/PointLocator.java r320 (JTS-1.12)
+ * Last port: algorithm/PointLocator.java 95fbe34b (JTS-1.15.2-SNAPSHOT)
  *
  **********************************************************************/
 
@@ -128,6 +128,9 @@ PointLocator::locate(const Coordinate& p, const Point *pt)
 int
 PointLocator::locate(const Coordinate& p, const LineString *l)
 {
+	if (!l->getEnvelopeInternal()->intersects(p))
+		return Location::EXTERIOR;
+
 	const CoordinateSequence* pt=l->getCoordinatesRO();
 	if (! l->isClosed()) {
 		if ((p==pt->getAt(0)) || (p==pt->getAt(pt->getSize()-1))) {
@@ -143,7 +146,9 @@ PointLocator::locate(const Coordinate& p, const LineString *l)
 int
 PointLocator::locateInPolygonRing(const Coordinate& p, const LinearRing *ring)
 {
-	// can this test be folded into isPointInRing ?
+	if (!ring->getEnvelopeInternal()->intersects(p)) {
+		return Location::EXTERIOR;
+	}
 
 	const CoordinateSequence *cl = ring->getCoordinatesRO();
 


=====================================
src/geom/CoordinateArraySequence.cpp
=====================================
--- a/src/geom/CoordinateArraySequence.cpp
+++ b/src/geom/CoordinateArraySequence.cpp
@@ -95,7 +95,7 @@ CoordinateArraySequence::getDimension() const
     if( dimension != 0 )
         return dimension;
 
-    if( vect->size() == 0 )
+    if( vect->empty() )
         return 3;
 
     if( ISNAN((*vect)[0].z) )


=====================================
src/geomgraph/EdgeEndStar.cpp
=====================================
--- a/src/geomgraph/EdgeEndStar.cpp
+++ b/src/geomgraph/EdgeEndStar.cpp
@@ -56,7 +56,7 @@ Coordinate&
 EdgeEndStar::getCoordinate()
 {
 	static Coordinate nullCoord(DoubleNotANumber, DoubleNotANumber, DoubleNotANumber);
-	if (edgeMap.size()==0) return nullCoord;
+	if (edgeMap.empty()) return nullCoord;
 
 	EdgeEndStar::iterator it=begin();
 	EdgeEnd *e=*it;
@@ -215,7 +215,7 @@ EdgeEndStar::checkAreaLabelsConsistent(int geomIndex)
 	// the left side of the edge
 
 	// if no edges, trivially consistent
-	if (edgeMap.size()==0) return true;
+	if (edgeMap.empty()) return true;
 
 	// initialize startLoc to location of last L side (if any)
 	assert(*rbegin());
@@ -366,4 +366,3 @@ operator<< (std::ostream& os, const EdgeEndStar& es)
 
 } // namespace geos.geomgraph
 } // namespace geos
-


=====================================
src/index/strtree/AbstractSTRtree.cpp
=====================================
--- a/src/index/strtree/AbstractSTRtree.cpp
+++ b/src/index/strtree/AbstractSTRtree.cpp
@@ -125,7 +125,10 @@ AbstractSTRtree::query(const void* searchBounds, vector<void*>& matches)
 {
 	if (!built) build();
 
-	if (itemBoundables->empty()) assert(root->getBounds()==nullptr);
+	if (itemBoundables->empty()) {
+		assert(root->getBounds()==nullptr);
+		return;
+	}
 
 	if (getIntersectsOp()->intersects(root->getBounds(), searchBounds))
 	{
@@ -139,7 +142,10 @@ AbstractSTRtree::query(const void* searchBounds, ItemVisitor& visitor)
 {
 	if (!built) build();
 
-	if (itemBoundables->empty()) assert(root->getBounds()==nullptr);
+	if (itemBoundables->empty()) {
+        assert(root->getBounds()==nullptr);
+        return;
+	}
 
 	if (getIntersectsOp()->intersects(root->getBounds(),searchBounds))
 	{


=====================================
src/noding/GeometryNoder.cpp
=====================================
--- a/src/noding/GeometryNoder.cpp
+++ b/src/noding/GeometryNoder.cpp
@@ -133,7 +133,7 @@ GeometryNoder::getNoded()
   {
     for (size_t i=0, n=lineList.size(); i<n; ++i)
       delete lineList[i];
-    throw ex;
+    throw;
   }
 
   std::unique_ptr<geom::Geometry> noded = toGeometry(*nodedEdges);


=====================================
src/operation/buffer/SubgraphDepthLocater.cpp
=====================================
--- a/src/operation/buffer/SubgraphDepthLocater.cpp
+++ b/src/operation/buffer/SubgraphDepthLocater.cpp
@@ -148,7 +148,7 @@ SubgraphDepthLocater::getDepth(const Coordinate& p)
 	findStabbedSegments(p, stabbedSegments);
 
 	// if no segments on stabbing line subgraph must be outside all others
-	if (stabbedSegments.size()==0) return 0;
+	if (stabbedSegments.empty()) return 0;
 
 	sort(stabbedSegments.begin(), stabbedSegments.end(), DepthSegmentLessThen());
 


=====================================
src/operation/linemerge/LineSequencer.cpp
=====================================
--- a/src/operation/linemerge/LineSequencer.cpp
+++ b/src/operation/linemerge/LineSequencer.cpp
@@ -232,7 +232,7 @@ LineSequencer::buildSequencedGeometry(const Sequences& sequences)
 		}
 	}
 
-	if ( lines->size() == 0 ) {
+	if ( lines->empty() ) {
 		return nullptr;
 	} else {
 		Geometry::NonConstVect *l=lines.get();


=====================================
src/operation/overlay/LineBuilder.cpp
=====================================
--- a/src/operation/overlay/LineBuilder.cpp
+++ b/src/operation/overlay/LineBuilder.cpp
@@ -225,7 +225,7 @@ LineBuilder::propagateZ(CoordinateSequence *cs)
 	cerr<<"  found "<<v3d.size()<<" 3d vertexes"<<endl;
 #endif
 
-	if ( v3d.size() == 0 )
+	if ( v3d.empty() )
 	{
 #if GEOS_DEBUG
 		cerr<<"  nothing to do"<<endl;
@@ -318,4 +318,3 @@ LineBuilder::labelIsolatedLine(Edge *e, int targetIndex)
 } // namespace geos.operation.overlay
 } // namespace geos.operation
 } // namespace geos
-


=====================================
swig/geos.i
=====================================
--- a/swig/geos.i
+++ b/swig/geos.i
@@ -29,8 +29,8 @@
    the whole c api. */
 #define GEOS_VERSION_MAJOR 3
 #define GEOS_VERSION_MINOR 7
-#define GEOS_VERSION_PATCH 0beta2
-#define GEOS_VERSION "3.7.0beta2"
+#define GEOS_VERSION_PATCH 0rc1
+#define GEOS_VERSION "3.7.0rc1"
 #define GEOS_JTS_PORT "1.13.0"
 
 #define GEOS_CAPI_VERSION_MAJOR 1
@@ -38,7 +38,7 @@
 #define GEOS_CAPI_VERSION_PATCH 0
 #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.0beta2-CAPI-1.11.0"
+#define GEOS_CAPI_VERSION "3.7.0rc1-CAPI-1.11.0"
 
 /* Supported geometry types */
 enum GEOSGeomTypes { 


=====================================
tests/unit/capi/GEOSIntersectsTest.cpp
=====================================
--- a/tests/unit/capi/GEOSIntersectsTest.cpp
+++ b/tests/unit/capi/GEOSIntersectsTest.cpp
@@ -158,5 +158,18 @@ namespace tut
 
     }
 
+    // Test for #782 (collection with empty components)
+    template<>
+    template<>
+    void object::test<6>()
+    {
+        geom1_ = GEOSGeomFromWKT("LINESTRING(10 0, 0 0, 0 10)");
+        geom2_ = GEOSGeomFromWKT("MULTILINESTRING((10 -1,-1 10),EMPTY)");
+
+        char r1 = GEOSIntersects(geom1_, geom2_);
+
+        ensure_equals(r1, 1);
+    }
+
 } // namespace tut
 


=====================================
tests/unit/capi/GEOSSTRtreeTest.cpp
=====================================
--- a/tests/unit/capi/GEOSSTRtreeTest.cpp
+++ b/tests/unit/capi/GEOSSTRtreeTest.cpp
@@ -230,6 +230,21 @@ namespace tut
 		GEOSSTRtree_destroy(tree);
 	}
 
+	// querying empty tree should not crash (see #730)
+    template<>
+    template<>
+    void object::test<7>() {
+	    GEOSSTRtree* tree = GEOSSTRtree_create(16);
+	    GEOSGeometry* q = GEOSGeomFromWKT("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))");
+	    GEOSSTRtree_query(tree, q, [](void* item, void* userdata) {
+	   		assert(item); // make unused parameter warning go away
+			assert(userdata);
+        }, nullptr);
+
+		GEOSGeom_destroy(q);
+		GEOSSTRtree_destroy(tree);
+	}
+
 } // namespace tut
 
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/compare/e31f5f098ee98ad8e151b44d1197f9e3ed3026c9...fdf62fc898d32f384e2be98742ebff9218427e85

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/compare/e31f5f098ee98ad8e151b44d1197f9e3ed3026c9...fdf62fc898d32f384e2be98742ebff9218427e85
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/20180819/c1fa833d/attachment-0001.html>


More information about the Pkg-grass-devel mailing list