[geos-commits] r4310 - in trunk: include/geos/geom/util src/geom/util src/simplify tests/unit/simplify
Sandro Santilli
strk at kbt.io
Fri Dec 2 05:58:35 PST 2016
Author: strk
Date: 2016-12-02 05:58:35 -0800 (Fri, 02 Dec 2016)
New Revision: 4310
Modified:
trunk/include/geos/geom/util/GeometryTransformer.h
trunk/src/geom/util/GeometryTransformer.cpp
trunk/src/simplify/DouglasPeuckerSimplifier.cpp
trunk/tests/unit/simplify/DouglasPeuckerSimplifierTest.cpp
Log:
Style only change, trim trailing blanks and fix indents
Modified: trunk/include/geos/geom/util/GeometryTransformer.h
===================================================================
--- trunk/include/geos/geom/util/GeometryTransformer.h 2016-12-01 15:00:35 UTC (rev 4309)
+++ trunk/include/geos/geom/util/GeometryTransformer.h 2016-12-02 13:58:35 UTC (rev 4310)
@@ -8,7 +8,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.
*
**********************************************************************
@@ -66,14 +66,14 @@
* the parent geometries types change appropriately to maintain valid structure.
* Subclasses will override whichever <code>transformX</code> methods
* they need to to handle particular Geometry types.
- *
+ *
* A typically usage would be a transformation that may transform Polygons into
* Polygons, LineStrings
* or Points. This class would likely need to override the
* {@link transformMultiPolygon} method to ensure that if input Polygons
* change type the result is a GeometryCollection,
* not a MultiPolygon
- *
+ *
* The default behaviour of this class is to simply recursively transform
* each Geometry component into an identical object by copying.
*
@@ -178,9 +178,9 @@
*/
bool preserveType;
- // Declare type as noncopyable
- GeometryTransformer(const GeometryTransformer& other);
- GeometryTransformer& operator=(const GeometryTransformer& rhs);
+ // Declare type as noncopyable
+ GeometryTransformer(const GeometryTransformer& other);
+ GeometryTransformer& operator=(const GeometryTransformer& rhs);
};
Modified: trunk/src/geom/util/GeometryTransformer.cpp
===================================================================
--- trunk/src/geom/util/GeometryTransformer.cpp 2016-12-01 15:00:35 UTC (rev 4309)
+++ trunk/src/geom/util/GeometryTransformer.cpp 2016-12-02 13:58:35 UTC (rev 4310)
@@ -8,7 +8,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.
*
**********************************************************************
@@ -98,7 +98,7 @@
throw IllegalArgumentException("Unknown Geometry subtype.");
}
-
+
std::auto_ptr<CoordinateSequence>
GeometryTransformer::createCoordinateSequence(
std::auto_ptr< std::vector<Coordinate> > coords)
@@ -262,7 +262,7 @@
Geometry::AutoPtr shell = transformLinearRing(lr, geom);
if ( shell.get() == NULL
- || ! dynamic_cast<LinearRing*>(shell.get())
+ || ! dynamic_cast<LinearRing*>(shell.get())
|| shell->isEmpty() )
{
isAllValidLinearRings = false;
Modified: trunk/src/simplify/DouglasPeuckerSimplifier.cpp
===================================================================
--- trunk/src/simplify/DouglasPeuckerSimplifier.cpp 2016-12-01 15:00:35 UTC (rev 4309)
+++ trunk/src/simplify/DouglasPeuckerSimplifier.cpp 2016-12-02 13:58:35 UTC (rev 4310)
@@ -7,7 +7,7 @@
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Licence as published
- * by the Free Software Foundation.
+ * by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
@@ -19,10 +19,10 @@
#include <geos/simplify/DouglasPeuckerSimplifier.h>
#include <geos/simplify/DouglasPeuckerLineSimplifier.h>
#include <geos/geom/Geometry.h> // for AutoPtr typedefs
-#include <geos/geom/MultiPolygon.h>
+#include <geos/geom/MultiPolygon.h>
#include <geos/geom/CoordinateSequence.h> // for AutoPtr typedefs
-#include <geos/geom/GeometryFactory.h>
-#include <geos/geom/CoordinateSequenceFactory.h>
+#include <geos/geom/GeometryFactory.h>
+#include <geos/geom/CoordinateSequenceFactory.h>
#include <geos/geom/util/GeometryTransformer.h> // for DPTransformer inheritance
#include <geos/util/IllegalArgumentException.h>
#include <geos/util.h>
Modified: trunk/tests/unit/simplify/DouglasPeuckerSimplifierTest.cpp
===================================================================
--- trunk/tests/unit/simplify/DouglasPeuckerSimplifierTest.cpp 2016-12-01 15:00:35 UTC (rev 4309)
+++ trunk/tests/unit/simplify/DouglasPeuckerSimplifierTest.cpp 2016-12-02 13:58:35 UTC (rev 4310)
@@ -1,4 +1,4 @@
-//
+//
// Test Suite for geos::simplify::DouglasPeuckerSimplifierTest
#include <tut.hpp>
@@ -19,7 +19,7 @@
namespace tut
{
using namespace geos::simplify;
-
+
//
// Test Group
//
@@ -51,7 +51,7 @@
template<>
template<>
void object::test<1>()
- {
+ {
std::string wkt("POLYGON((20 220, 40 220, 60 220, 80 220, 100 220, \
120 220, 140 220, 140 180, 100 180, 60 180, 20 180, 20 220))");
@@ -70,10 +70,10 @@
template<>
template<>
void object::test<2>()
- {
+ {
std::string wkt_in("POLYGON ((40 240, 160 241, 280 240, 280 160, \
160 240, 40 140, 40 240))");
-
+
std::string wkt_ex("MULTIPOLYGON (((40.0 240.0, 160.0 240.0, 40.0 140.0, 40.0 240.0)), \
((160.0 240.0, 280.0 240.0, 280.0 160.0, 160.0 240.0)))");
@@ -87,7 +87,7 @@
g.get(), 10.0);
ensure( simplified->isValid() );
-
+
ensure( simplified->equalsExact(expected.get()) );
}
@@ -96,7 +96,7 @@
template<>
template<>
void object::test<3>()
- {
+ {
std::string wkt_in("POLYGON ((120 120, 121 121, 122 122, 220 120, \
180 199, 160 200, 140 199, 120 120))");
@@ -110,7 +110,7 @@
g.get(), 10.0);
ensure( simplified->isValid() );
-
+
ensure( simplified->equalsExact(expected.get()) );
}
@@ -119,10 +119,10 @@
template<>
template<>
void object::test<4>()
- {
+ {
std::string wkt_in("POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200), \
(120 120, 220 120, 180 199, 160 200, 140 199, 120 120))");
-
+
std::string wkt_ex("POLYGON ((80 200, 160 200, 240 200, 240 60, 80 60, 80 200), \
(160 200, 140 199, 120 120, 220 120, 180 199, 160 200)))");
@@ -145,7 +145,7 @@
template<>
template<>
void object::test<5>()
- {
+ {
std::string wkt_in("POLYGON ((0 0, 50 0, 53 0, 55 0, 100 0, 70 1, 60 1, 50 1, 40 1, 0 0))");
std::string wkt_ex("POLYGON EMPTY");
@@ -167,7 +167,7 @@
template<>
template<>
void object::test<6>()
- {
+ {
std::string wkt_in("POLYGON ((0 5, 5 5, 5 0, 0 0, 0 1, 0 5))");
std::string wkt_ex("POLYGON EMPTY");
@@ -189,7 +189,7 @@
template<>
template<>
void object::test<7>()
- {
+ {
std::string wkt_in("LINESTRING (0 5, 1 5, 2 5, 5 5)");
std::string wkt_ex("LINESTRING (0 5, 5 5)");
@@ -210,7 +210,7 @@
template<>
template<>
void object::test<8>()
- {
+ {
std::string wkt_in("MULTIPOINT(80 200, 240 200, 240 60, 80 60, 80 200, 140 199, 120 120)");
GeomPtr g(wktreader.read(wkt_in));
@@ -226,10 +226,10 @@
template<>
template<>
void object::test<9>()
- {
+ {
std::string wkt_in("MULTILINESTRING( (0 0, 50 0, 70 0, 80 0, 100 0), \
(0 0, 50 1, 60 1, 100 0) )");
-
+
std::string wkt_ex("MULTILINESTRING( (0 0, 100 0), (0 0, 100 0) )");
GeomPtr g(wktreader.read(wkt_in));
@@ -248,7 +248,7 @@
template<>
template<>
void object::test<10>()
- {
+ {
std::string wkt_in("GEOMETRYCOLLECTION ( \
MULTIPOINT (80 200, 240 200, 240 60, 80 60, 80 200, 140 199, 120 120), \
POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200)), \
@@ -286,7 +286,7 @@
GeomPtr g(wktreader.read(wkt));
std::size_t const gN = g->getNumPoints();
ensure_equals(gN, std::size_t(37));
-
+
// 1) Simplify with 1/2048
double const d1 = 1/2048.0;
GeomPtr simplified1 = DouglasPeuckerSimplifier::simplify(g.get(), d1);
@@ -311,8 +311,8 @@
::geos::ignore_unused_variable_warning(seq);
::geos::ignore_unused_variable_warning(i);
}
- bool isDone() const { return false; }
- bool isGeometryChanged() const { return true; }
+ bool isDone() const { return false; }
+ bool isGeometryChanged() const { return true; }
};
Multiplier m(2047);
More information about the geos-commits
mailing list