[geos-commits] r4373 - in branches/3.6: . include/geos/geom include/geos/index/strtree include/geos/util src/algorithm src/geom

Mateusz Loskot mateusz at loskot.net
Sun Mar 26 15:42:49 PDT 2017


Author: mloskot
Date: 2017-03-26 15:42:49 -0700 (Sun, 26 Mar 2017)
New Revision: 4373

Modified:
   branches/3.6/
   branches/3.6/autogen.bat
   branches/3.6/include/geos/geom/Lineal.h
   branches/3.6/include/geos/geom/Polygonal.h
   branches/3.6/include/geos/geom/Puntal.h
   branches/3.6/include/geos/index/strtree/AbstractSTRtree.h
   branches/3.6/include/geos/util/GEOSException.h
   branches/3.6/src/algorithm/CGAlgorithms.cpp
   branches/3.6/src/algorithm/LineIntersector.cpp
   branches/3.6/src/geom/IntersectionMatrix.cpp
Log:
Merged revision(s) 4344-4346, 4350, 4356, 4364 from trunk:
Fix warning: conversion from size_t to int
........
Disable warning C4275: non-DLL-interface std::exception used as base for DLL-interface GEOSException
........
Fix warnings about variables aliasing within scope
........
Disable false warning C4589 : Constructor of abstract class A ignores initializer for virtual base class B
(Details at https://connect.microsoft.com/VisualStudio/feedback/details/1581706/false-warning-c4589-constructor-of-abstract-class-class2-ignores-initializer-for-virtual-base-class-class1)
........
Fix warnings about variables aliasing within scope
........
Add step generating geos_svn_revision.h template with revision 0

Simplifies CI build steps.
........




Property changes on: branches/3.6
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/3.4:4056
/branches/3.5:4210
/trunk:4340,4343,4347-4349,4351-4355,4358,4360,4362,4365
   + /branches/3.4:4056
/branches/3.5:4210
/trunk:4340,4343-4356,4358,4360,4362,4364-4365

Modified: branches/3.6/autogen.bat
===================================================================
--- branches/3.6/autogen.bat	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/autogen.bat	2017-03-26 22:42:49 UTC (rev 4373)
@@ -14,3 +14,4 @@
 COPY %GEOS_HEADERS%\version.h.vc %GEOS_HEADERS%\version.h 
 COPY %GEOS_HEADERS%\platform.h.vc %GEOS_HEADERS%\platform.h
 COPY capi\geos_c.h.in capi\geos_c.h
+ at ECHO #define GEOS_SVN_REVISION 0 > geos_svn_revision.h
\ No newline at end of file


Property changes on: branches/3.6/autogen.bat
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/autogen.bat:4364

Modified: branches/3.6/include/geos/geom/Lineal.h
===================================================================
--- branches/3.6/include/geos/geom/Lineal.h	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/include/geos/geom/Lineal.h	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -22,6 +22,11 @@
 #include <geos/export.h>
 #include <geos/geom/Geometry.h> // for inheritance
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4589) // warning C4589 : Constructor of abstract class 'Lineal' ignores initializer for virtual base class 'Geometry'
+#endif
+
 namespace geos {
 namespace geom { // geos::geom
 
@@ -38,4 +43,8 @@
 } // namespace geos::geom
 } // namespace geos
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #endif // ndef GEOS_GEOM_LINEAL_H

Modified: branches/3.6/include/geos/geom/Polygonal.h
===================================================================
--- branches/3.6/include/geos/geom/Polygonal.h	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/include/geos/geom/Polygonal.h	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -22,6 +22,11 @@
 #include <geos/export.h>
 #include <geos/geom/Geometry.h> // for inheritance
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4589) // warning C4589 : Constructor of abstract class 'Puntal' ignores initializer for virtual base class 'Geometry'
+#endif
+
 namespace geos {
 namespace geom { // geos::geom
 
@@ -38,4 +43,8 @@
 } // namespace geos::geom
 } // namespace geos
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #endif // ndef GEOS_GEOM_POLYGONAL_H

Modified: branches/3.6/include/geos/geom/Puntal.h
===================================================================
--- branches/3.6/include/geos/geom/Puntal.h	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/include/geos/geom/Puntal.h	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -22,6 +22,11 @@
 #include <geos/export.h>
 #include <geos/geom/Geometry.h> // for inheritance
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4589) // warning C4589 : Constructor of abstract class 'Puntal' ignores initializer for virtual base class 'Geometry'
+#endif
+
 namespace geos {
 namespace geom { // geos::geom
 
@@ -38,4 +43,8 @@
 } // namespace geos::geom
 } // namespace geos
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #endif // ndef GEOS_GEOM_PUNTAL_H

Modified: branches/3.6/include/geos/index/strtree/AbstractSTRtree.h
===================================================================
--- branches/3.6/include/geos/index/strtree/AbstractSTRtree.h	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/include/geos/index/strtree/AbstractSTRtree.h	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -193,11 +193,11 @@
 	virtual std::auto_ptr<BoundableList> createParentBoundables(
 			BoundableList* childBoundables, int newLevel);
 
-	virtual AbstractNode* lastNode(BoundableList* nodes)
+	virtual AbstractNode* lastNode(BoundableList* nodeList)
 	{
-		assert(!nodes->empty());
+		assert(!nodeList->empty());
 		// Cast from Boundable to AbstractNode
-		return static_cast<AbstractNode*>( nodes->back() );
+		return static_cast<AbstractNode*>(nodeList->back() );
 	}
 
 	virtual AbstractNode* getRoot() {

Modified: branches/3.6/include/geos/util/GEOSException.h
===================================================================
--- branches/3.6/include/geos/util/GEOSException.h	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/include/geos/util/GEOSException.h	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -23,6 +23,7 @@
 #ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
+#pragma warning(disable: 4275) // warning C4275: non-DLL-interface std::exception used as base for DLL-interface GEOSException
 #endif
 
 namespace geos {

Modified: branches/3.6/src/algorithm/CGAlgorithms.cpp
===================================================================
--- branches/3.6/src/algorithm/CGAlgorithms.cpp	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/src/algorithm/CGAlgorithms.cpp	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -329,9 +329,9 @@
 
 	double len = 0.0;
 
-	const Coordinate& p = pts->getAt(0);
-	double x0 = p.x;
-	double y0 = p.y;
+	const Coordinate& p0 = pts->getAt(0);
+	double x0 = p0.x;
+	double y0 = p0.y;
 
 	for(size_t i = 1; i < npts; ++i)
 	{

Modified: branches/3.6/src/algorithm/LineIntersector.cpp
===================================================================
--- branches/3.6/src/algorithm/LineIntersector.cpp	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/src/algorithm/LineIntersector.cpp	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -743,10 +743,10 @@
 void
 LineIntersector::intersection(const Coordinate& p1,
 	const Coordinate& p2, const Coordinate& q1, const Coordinate& q2,
-	Coordinate &intPt) const
+	Coordinate &intPtOut) const
 {
 
-	intersectionWithNormalization(p1, p2, q1, q2, intPt);
+	intersectionWithNormalization(p1, p2, q1, q2, intPtOut);
 
 	/*
 	 * Due to rounding it can happen that the computed intersection is
@@ -763,10 +763,10 @@
 	 * int point = (2097408.2633752143,1144595.8008114607)
 	 */
 
-	if (! isInSegmentEnvelopes(intPt))
+	if (! isInSegmentEnvelopes(intPtOut))
 	{
 		//intPt = CentralEndpointIntersector::getIntersection(p1, p2, q1, q2);
-		intPt = nearestEndpoint(p1, p2, q1, q2);
+	  intPtOut = nearestEndpoint(p1, p2, q1, q2);
 #if GEOS_DEBUG
 		cerr << "Intersection outside segment envelopes, snapped to "
 		     << intPt.toString() << endl;
@@ -774,18 +774,18 @@
 	}
  
 	if (precisionModel!=NULL) {
-		precisionModel->makePrecise(intPt);
+		precisionModel->makePrecise(intPtOut);
 	}
 
 
 #if COMPUTE_Z
 	double ztot = 0;
 	double zvals = 0;
-	double zp = interpolateZ(intPt, p1, p2);
-	double zq = interpolateZ(intPt, q1, q2);
+	double zp = interpolateZ(intPtOut, p1, p2);
+	double zq = interpolateZ(intPtOut, q1, q2);
 	if ( !ISNAN(zp)) { ztot += zp; zvals++; }
 	if ( !ISNAN(zq)) { ztot += zq; zvals++; }
-	if ( zvals ) intPt.z = ztot/zvals;
+	if ( zvals ) intPtOut.z = ztot/zvals;
 #endif // COMPUTE_Z
 
 }
@@ -794,7 +794,7 @@
 void
 LineIntersector::intersectionWithNormalization(const Coordinate& p1,
 	const Coordinate& p2, const Coordinate& q1, const Coordinate& q2,
-	Coordinate &intPt) const
+	Coordinate &intPtOut) const
 {
 	Coordinate n1=p1;
 	Coordinate n2=p2;
@@ -803,10 +803,10 @@
 	Coordinate normPt;
 	normalizeToEnvCentre(n1, n2, n3, n4, normPt);
 
-	safeHCoordinateIntersection(n1, n2, n3, n4, intPt);
+	safeHCoordinateIntersection(n1, n2, n3, n4, intPtOut);
 
-	intPt.x += normPt.x;
-	intPt.y += normPt.y;
+	intPtOut.x += normPt.x;
+	intPtOut.y += normPt.y;
 }
 
 
@@ -832,11 +832,11 @@
 
 /*private*/
 bool
-LineIntersector::isInSegmentEnvelopes(const Coordinate& intPt) const
+LineIntersector::isInSegmentEnvelopes(const Coordinate& pt) const
 {
 	Envelope env0(*inputLines[0][0], *inputLines[0][1]);
 	Envelope env1(*inputLines[1][0], *inputLines[1][1]);
-	return env0.contains(intPt) && env1.contains(intPt);
+	return env0.contains(pt) && env1.contains(pt);
 }
 
 /*private*/
@@ -895,10 +895,10 @@
 void
 LineIntersector::safeHCoordinateIntersection(const Coordinate& p1,
 		const Coordinate& p2, const Coordinate& q1,
-		const Coordinate& q2, Coordinate& intPt) const
+		const Coordinate& q2, Coordinate& intPtOut) const
 {
 	try {
-		HCoordinate::intersection(p1, p2, q1, q2, intPt);
+		HCoordinate::intersection(p1, p2, q1, q2, intPtOut);
 #if GEOS_DEBUG
 		cerr<<" HCoordinate found intersection h:"<<intPt.toString()<<endl;
 #endif
@@ -906,7 +906,7 @@
 	} catch (const NotRepresentableException& /* e */) {
 		// compute an approximate result
 		//intPt = CentralEndpointIntersector::getIntersection(p1, p2, q1, q2);
-		intPt = nearestEndpoint(p1, p2, q1, q2);
+		intPtOut = nearestEndpoint(p1, p2, q1, q2);
     	}
 }
 

Modified: branches/3.6/src/geom/IntersectionMatrix.cpp
===================================================================
--- branches/3.6/src/geom/IntersectionMatrix.cpp	2017-03-26 22:34:14 UTC (rev 4372)
+++ branches/3.6/src/geom/IntersectionMatrix.cpp	2017-03-26 22:42:49 UTC (rev 4373)
@@ -1,4 +1,4 @@
-/**********************************************************************
+/**********************************************************************
  *
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
@@ -160,7 +160,7 @@
 {
 	size_t limit = dimensionSymbols.length();
 
-	for (size_t i = 0; i < limit; i++)
+	for (int i = 0; i < static_cast<int>(limit); i++)
 	{
 		int row = i / firstDim;
 		int col = i % secondDim;
@@ -200,7 +200,7 @@
 {
 	size_t limit = minimumDimensionSymbols.length();
 
-	for (size_t i = 0; i < limit; i++)
+	for (int i = 0; i < static_cast<int>(limit); i++)
 	{
 		int row = i / firstDim;
 		int col = i % secondDim;



More information about the geos-commits mailing list