[geos-commits] [SCM] GEOS branch main updated. b094c692d908c41a0dd1298b44557c8de24de939
git at osgeo.org
git at osgeo.org
Wed Jul 9 13:38:31 PDT 2025
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, main has been updated
via b094c692d908c41a0dd1298b44557c8de24de939 (commit)
from f20da918c2b5d1edff7b2ac076332763792104ef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b094c692d908c41a0dd1298b44557c8de24de939
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Jul 9 13:38:11 2025 -0700
Remove unused Unload class (#1284)
diff --git a/include/geos.h b/include/geos.h
index d5f9a8f11..31be3a966 100644
--- a/include/geos.h
+++ b/include/geos.h
@@ -33,7 +33,6 @@
#include <geos/io/WKTReader.h>
#include <geos/io/WKTWriter.h>
#include <geos/io/CLocalizer.h>
-#include <geos/unload.h>
/// Basic namespace for all GEOS functionalities.
namespace geos {
diff --git a/include/geos/geom/Geometry.h b/include/geos/geom/Geometry.h
index 36e64f042..4701c762e 100644
--- a/include/geos/geom/Geometry.h
+++ b/include/geos/geom/Geometry.h
@@ -63,7 +63,6 @@ class Point;
class IntersectionMatrix;
}
namespace io { // geos.io
-class Unload;
} // namespace geos.io
}
@@ -1047,4 +1046,3 @@ struct GeomPtrPair {
#ifdef _MSC_VER
#pragma warning(pop)
#endif
-
diff --git a/include/geos/geom/PrecisionModel.h b/include/geos/geom/PrecisionModel.h
index 2228067c5..d0d8ac648 100644
--- a/include/geos/geom/PrecisionModel.h
+++ b/include/geos/geom/PrecisionModel.h
@@ -28,7 +28,6 @@
// Forward declarations
namespace geos {
namespace io {
-class Unload;
}
namespace geom {
class Coordinate;
@@ -86,7 +85,6 @@ namespace geom { // geos::geom
*
*/
class GEOS_DLL PrecisionModel {
- friend class io::Unload;
public:
diff --git a/include/geos/index/quadtree/Root.h b/include/geos/index/quadtree/Root.h
index c6fe85f1f..578be33c3 100644
--- a/include/geos/index/quadtree/Root.h
+++ b/include/geos/index/quadtree/Root.h
@@ -46,7 +46,6 @@ namespace quadtree { // geos::index::quadtree
* and does not have a defined extent.
*/
class GEOS_DLL Root: public NodeBase {
-//friend class Unload;
private:
@@ -84,4 +83,3 @@ protected:
} // namespace geos::index::quadtree
} // namespace geos::index
} // namespace geos
-
diff --git a/include/geos/unload.h b/include/geos/unload.h
deleted file mode 100644
index d60a83b5f..000000000
--- a/include/geos/unload.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2001-2002 Vivid Solutions Inc.
- *
- * 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.
- * See the COPYING file for more information.
- *
- **********************************************************************/
-
-#pragma once
-
-#include <geos/export.h>
-
-//xie add for realse static memory 2003,10,06
-namespace geos {
-namespace io {
-
-class GEOS_DLL Unload {
-private:
- Unload(void) {}
- ~Unload(void) {}
-public:
- static void Release();
-};
-
-}
-}
-
diff --git a/src/io/Unload.cpp b/src/io/Unload.cpp
deleted file mode 100644
index ff869e828..000000000
--- a/src/io/Unload.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2005-2006 Refractions Research Inc.
- * Copyright (C) 2001-2002 Vivid Solutions Inc.
- *
- * 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.
- * See the COPYING file for more information.
- *
- **********************************************************************/
-
-#include <geos/unload.h>
-#include <geos/geom/Geometry.h>
-#include <geos/geom/GeometryFactory.h>
-
-namespace geos {
-namespace io { // geos.io
-
-/*public static*/
-void
-Unload::Release()
-{
- //delete geom::Geometry::INTERNAL_GEOMETRY_FACTORY;
-}
-
-} // namespace geos.io
-} //namespace geos
-
diff --git a/tests/unit/geos_unit.cpp b/tests/unit/geos_unit.cpp
index 8e008c8b2..a21402cee 100644
--- a/tests/unit/geos_unit.cpp
+++ b/tests/unit/geos_unit.cpp
@@ -10,8 +10,6 @@
// tut
#include <tut/tut.hpp>
#include <tut/tut_reporter.hpp>
-// geos
-#include <geos/unload.h>
// std
#include <cstdlib>
#include <iomanip>
@@ -119,8 +117,5 @@ main(int argc, const char* argv[])
return EXIT_FAILURE;
}
- // XXX - mloskot - this should be removed in future!
- geos::io::Unload::Release();
-
return (visi.all_ok() ? EXIT_SUCCESS : EXIT_FAILURE);
}
diff --git a/tests/xmltester/XMLTester.cpp b/tests/xmltester/XMLTester.cpp
index aac0efb78..c3b33b939 100644
--- a/tests/xmltester/XMLTester.cpp
+++ b/tests/xmltester/XMLTester.cpp
@@ -57,7 +57,6 @@
#include <geos/operation/polygonize/Polygonizer.h>
#include <geos/operation/linemerge/LineMerger.h>
#include <geos/profiler.h>
-#include <geos/unload.h>
#include <geos/operation/valid/IsValidOp.h>
#include "XMLTester.h"
#include "BufferResultMatcher.h"
@@ -151,7 +150,7 @@ tolower(std::string& str)
void toupper(std::string& s)
{
- std::transform(s.begin(), s.end(), s.begin(),
+ std::transform(s.begin(), s.end(), s.begin(),
[](char c){ return (char)std::toupper(c); }
);
}
@@ -231,7 +230,7 @@ XMLTester::setVerbosityLevel(int value)
return old_value;
}
-std::string
+std::string
XMLTester::testcaseRef()
{
std::stringstream ref;
@@ -630,7 +629,7 @@ XMLTester::printGeom(const geom::Geometry* g)
void
XMLTester::runTest(const tinyxml2::XMLNode* node)
{
- Test test(*this);
+ Test test(*this);
++testCount;
testLineNum = node->GetLineNum();
@@ -845,9 +844,9 @@ Test::areaDelta(const geom::Geometry* a, const geom::Geometry* b, std::string& r
}
void
-Test::checkResult( const Geometry& result )
+Test::checkResult( const Geometry& result )
{
- checkResult( result,
+ checkResult( result,
[](Geometry& expected, Geometry& actual) -> bool {
//TODO: change to equalsExact, since compareTo doesn't check empty type
return expected.compareTo(&actual) == 0;
@@ -855,8 +854,8 @@ Test::checkResult( const Geometry& result )
}
void
-Test::checkResult( const Geometry& result,
- std::function<bool(Geometry& expected, Geometry& actual)> isMatch )
+Test::checkResult( const Geometry& result,
+ std::function<bool(Geometry& expected, Geometry& actual)> isMatch )
{
std::string expectedRes = opResult;
std::unique_ptr<Geometry> gExpectedRes(tester.parseGeometry(expectedRes, "expected"));
@@ -875,16 +874,16 @@ Test::checkResult( const Geometry& result,
//TODO: remove this hack when tests are fixed. Only used for union, and has a bug where empties test equal
void
-Test::checkUnionResult( const Geometry& result )
+Test::checkUnionResult( const Geometry& result )
{
- checkResult( result,
+ checkResult( result,
[](Geometry& expected, Geometry& actual) -> bool {
return checkOverlaySuccess(expected, actual);
});
}
void
-Test::checkResult( bool result )
+Test::checkResult( bool result )
{
actualResultStr = result ? "true" : "false";
if (actualResultStr == opResult) {
@@ -893,7 +892,7 @@ Test::checkResult( bool result )
}
void
-Test::checkResult( double result)
+Test::checkResult( double result)
{
char* rest;
double expectedRes = std::strtod(opResult.c_str(), &rest);
@@ -1031,7 +1030,7 @@ void Test::execute(Geometry* geomA, Geometry* geomB)
}
void Test::executeOp(Geometry* gA, Geometry* gB)
-{
+{
if(opName == "relate") {
std::unique_ptr<geom::IntersectionMatrix> im(gA->relate(gB));
checkResult( im->matches(opArg3) );
@@ -1184,7 +1183,7 @@ void Test::executeOp(Geometry* gA, Geometry* gB)
}
operation::buffer::BufferOp op(gA, params);
std::unique_ptr<Geometry> result = op.getResultGeometry(dist);
- checkResult( *result,
+ checkResult( *result,
[dist](Geometry& expected, Geometry& actual) -> bool {
return checkBufferSuccess(expected, actual, dist);
});
@@ -1200,7 +1199,7 @@ void Test::executeOp(Geometry* gA, Geometry* gB)
operation::buffer::BufferOp op(gA, params);
std::unique_ptr<Geometry> result = op.getResultGeometry(dist);
- checkResult( *result,
+ checkResult( *result,
[dist](Geometry& expected, Geometry& actual) -> bool {
return checkBufferSuccess(expected, actual, dist);
});
@@ -1219,7 +1218,7 @@ void Test::executeOp(Geometry* gA, Geometry* gB)
}
operation::buffer::BufferBuilder bufBuilder(params) ;
std::unique_ptr<Geometry> result = bufBuilder.bufferLineSingleSided(gA, dist, leftSide);
- checkResult( *result,
+ checkResult( *result,
[dist](Geometry& expected, Geometry& actual) -> bool {
return checkSingleSidedBufferSuccess(expected, actual, dist);
});
@@ -1255,7 +1254,7 @@ void Test::executeOp(Geometry* gA, Geometry* gB)
std::stringstream p_tmp;
double maxDiff = 1e-6;
double areaDiff = areaDelta(gA, gB, maxDiffOp, maxDiff, p_tmp);
-
+
// Debug output of actual geometries returned
if (areaDiff < maxDiff && false) {
std::cout << p_tmp.str();
@@ -1479,8 +1478,6 @@ main(int argC, char* argV[])
tester.resultSummary(std::cerr);
}
- io::Unload::Release();
-
return tester.getFailuresCount();
#if defined(_MSC_VER) && defined(GEOS_TEST_USE_STACKWALKER)
@@ -1488,4 +1485,3 @@ main(int argC, char* argV[])
DeInitAllocCheck();
#endif
}
-
-----------------------------------------------------------------------
Summary of changes:
include/geos.h | 1 -
include/geos/geom/Geometry.h | 2 --
include/geos/geom/PrecisionModel.h | 2 --
include/geos/index/quadtree/Root.h | 2 --
include/geos/unload.h | 33 ---------------------------------
src/io/Unload.cpp | 32 --------------------------------
tests/unit/geos_unit.cpp | 5 -----
tests/xmltester/XMLTester.cpp | 36 ++++++++++++++++--------------------
8 files changed, 16 insertions(+), 97 deletions(-)
delete mode 100644 include/geos/unload.h
delete mode 100644 src/io/Unload.cpp
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list