[geos-commits] r2538 - in trunk: build/msvc90/geos_c_dll
build/msvc90/geos_lib build/msvc90/geos_unit source
source/geom source/headers/geos/algorithm/distance
source/index/chain tests/unit/operation/valid
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Jun 4 11:01:09 EDT 2009
Author: mloskot
Date: 2009-06-04 11:01:08 -0400 (Thu, 04 Jun 2009)
New Revision: 2538
Modified:
trunk/build/msvc90/geos_c_dll/geos_c_dll.vcproj
trunk/build/msvc90/geos_lib/geos_lib.vcproj
trunk/build/msvc90/geos_unit/geos_unit.vcproj
trunk/source/Makefile.vc
trunk/source/geom/LinearRing.cpp
trunk/source/headers/geos/algorithm/distance/DiscreteHausdorffDistance.h
trunk/source/index/chain/MonotoneChainBuilder.cpp
trunk/tests/unit/operation/valid/IsValidTest.cpp
Log:
* Applied patch for ticket #257.
* Noticed that unit tests fail:
1>geos::util::UniqueCoordinateArrayFilter: .
1>---> group: geos::operation::valid::IsValidOp, test: test<1>
1> problem: assertion failed
Modified: trunk/build/msvc90/geos_c_dll/geos_c_dll.vcproj
===================================================================
--- trunk/build/msvc90/geos_c_dll/geos_c_dll.vcproj 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/build/msvc90/geos_c_dll/geos_c_dll.vcproj 2009-06-04 15:01:08 UTC (rev 2538)
@@ -213,6 +213,10 @@
RelativePath="..\..\..\capi\geos_ts_c.cpp"
>
</File>
+ <File
+ RelativePath="..\..\..\capi\Makefile.am"
+ >
+ </File>
</Filter>
<File
RelativePath=".\Makefile.am"
Modified: trunk/build/msvc90/geos_lib/geos_lib.vcproj
===================================================================
--- trunk/build/msvc90/geos_lib/geos_lib.vcproj 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/build/msvc90/geos_lib/geos_lib.vcproj 2009-06-04 15:01:08 UTC (rev 2538)
@@ -168,6 +168,14 @@
Name="algorithm"
>
<File
+ RelativePath="..\..\..\source\algorithm\Angle.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\algorithm\BoundaryNodeRule.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\algorithm\CentroidArea.cpp"
>
</File>
@@ -273,6 +281,18 @@
</FileConfiguration>
</File>
</Filter>
+ <Filter
+ Name="distance"
+ >
+ <File
+ RelativePath="..\..\..\source\algorithm\distance\DiscreteHausdorffDistance.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\algorithm\distance\DistanceToPoint.cpp"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="index"
@@ -920,6 +940,10 @@
Name="noding"
>
<File
+ RelativePath="..\..\..\source\noding\BasicSegmentString.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\noding\FastNodingValidator.cpp"
>
</File>
@@ -960,6 +984,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\noding\OrientedCoordinateArray.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\noding\ScaledNoder.cpp"
>
</File>
@@ -1179,10 +1207,22 @@
>
</File>
<File
+ RelativePath="..\..\..\source\operation\buffer\BufferInputLineSimplifier.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\operation\buffer\BufferInputLineSimplifier.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\operation\buffer\BufferOp.cpp"
>
</File>
<File
+ RelativePath="..\..\..\source\operation\buffer\BufferParameters.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\operation\buffer\BufferSubgraph.cpp"
>
</File>
@@ -1195,6 +1235,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\operation\buffer\OffsetCurveVertexList.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\operation\buffer\RightmostEdgeFinder.cpp"
>
</File>
@@ -1239,10 +1283,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\operation\overlay\FuzzyPointLocator.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\source\operation\overlay\LineBuilder.cpp"
>
</File>
@@ -1255,10 +1295,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\operation\overlay\OffsetPointGenerator.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\source\operation\overlay\OverlayNodeFactory.cpp"
>
</File>
@@ -1267,10 +1303,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\operation\overlay\OverlayResultValidator.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\source\operation\overlay\PointBuilder.cpp"
>
</File>
@@ -1278,6 +1310,42 @@
RelativePath="..\..\..\source\operation\overlay\PolygonBuilder.cpp"
>
</File>
+ <Filter
+ Name="snap"
+ >
+ <File
+ RelativePath="..\..\..\source\operation\overlay\snap\GeometrySnapper.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\operation\overlay\snap\LineStringSnapper.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\operation\overlay\snap\SnapIfNeededOverlayOp.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\operation\overlay\snap\SnapOverlayOp.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="validate"
+ >
+ <File
+ RelativePath="..\..\..\source\operation\overlay\validate\FuzzyPointLocator.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\operation\overlay\validate\OffsetPointGenerator.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\operation\overlay\validate\OverlayResultValidator.cpp"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="polygonize"
@@ -1369,6 +1437,14 @@
>
</File>
<File
+ RelativePath="..\..\..\source\operation\valid\IndexedNestedRingTester.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\operation\valid\IndexedNestedRingTester.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\operation\valid\IsValidOp.cpp"
>
</File>
Modified: trunk/build/msvc90/geos_unit/geos_unit.vcproj
===================================================================
--- trunk/build/msvc90/geos_unit/geos_unit.vcproj 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/build/msvc90/geos_unit/geos_unit.vcproj 2009-06-04 15:01:08 UTC (rev 2538)
@@ -41,7 +41,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=".\;..\..\..\tests\unit;..\..\..\tests\tut;..\..\..\capi;..\..\..\source\headers"
+ AdditionalIncludeDirectories=".\;..\..\..\tests\unit;..\..\..\tests\unit\tut;..\..\..\capi;..\..\..\source\headers"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;NOGDI"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -120,7 +120,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\;..\..\..\tests\unit;..\..\..\tests\tut;..\..\..\capi;..\..\..\source\headers"
+ AdditionalIncludeDirectories=".\;..\..\..\tests\unit;..\..\..\tests\unit\tut;..\..\..\capi;..\..\..\source\headers"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;NOGDI"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@@ -180,17 +180,37 @@
Name="tut"
>
<File
- RelativePath="..\..\..\tests\tut\tut.h"
+ RelativePath="..\..\..\tests\unit\tut\tut.hpp"
>
</File>
<File
- RelativePath="..\..\..\tests\tut\tut_reporter.h"
+ RelativePath="..\..\..\tests\unit\tut\tut_assert.hpp"
>
</File>
<File
- RelativePath="..\..\..\tests\tut\tut_restartable.h"
+ RelativePath="..\..\..\tests\unit\tut\tut_exception.hpp"
>
</File>
+ <File
+ RelativePath="..\..\..\tests\unit\tut\tut_posix.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\tut\tut_reporter.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\tut\tut_restartable.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\tut\tut_result.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\tut\tut_runner.hpp"
+ >
+ </File>
</Filter>
<Filter
Name="geom"
@@ -292,17 +312,21 @@
Name="noding"
>
<File
- RelativePath="..\..\..\tests\unit\noding\SegmentNodeTest.cpp"
+ RelativePath="..\..\..\tests\unit\noding\BasicSegmentStringTest.cpp"
>
</File>
<File
- RelativePath="..\..\..\tests\unit\noding\SegmentPointComparatorTest.cpp"
+ RelativePath="..\..\..\tests\unit\noding\NodedSegmentStringTest.cpp"
>
</File>
<File
- RelativePath="..\..\..\tests\unit\noding\SegmentStringTest.cpp"
+ RelativePath="..\..\..\tests\unit\noding\SegmentNodeTest.cpp"
>
</File>
+ <File
+ RelativePath="..\..\..\tests\unit\noding\SegmentPointComparatorTest.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="io"
@@ -339,6 +363,14 @@
RelativePath="..\..\..\tests\unit\algorithm\PointLocatorTest.cpp"
>
</File>
+ <File
+ RelativePath="..\..\..\tests\unit\algorithm\RobustLineIntersectionTest.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\algorithm\RobustLineIntersectorTest.cpp"
+ >
+ </File>
<Filter
Name="CGAlgorithms"
>
@@ -355,6 +387,14 @@
>
</File>
</Filter>
+ <Filter
+ Name="distance"
+ >
+ <File
+ RelativePath="..\..\..\tests\unit\algorithm\distance\DiscreteHausdorffDistanceTest.cpp"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="index"
@@ -394,24 +434,56 @@
<Filter
Name="overlay"
>
+ <Filter
+ Name="validate"
+ >
+ <File
+ RelativePath="..\..\..\tests\unit\operation\overlay\validate\FuzzyPointLocatorTest.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\operation\overlay\validate\OffsetPointGeneratorTest.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\operation\overlay\validate\OverlayResultValidatorTest.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="snap"
+ >
+ <File
+ RelativePath="..\..\..\tests\unit\operation\overlay\snap\GeometrySnapperTest.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tests\unit\operation\overlay\snap\LineStringSnapperTest.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="union"
+ >
<File
- RelativePath="..\..\..\tests\unit\operation\overlay\FuzzyPointLocatorTest.cpp"
+ RelativePath="..\..\..\tests\unit\operation\union\CascadedPolygonUnionTest.cpp"
>
</File>
+ </Filter>
+ <Filter
+ Name="valid"
+ >
<File
- RelativePath="..\..\..\tests\unit\operation\overlay\OffsetPointGeneratorTest.cpp"
+ RelativePath="..\..\..\tests\unit\operation\valid\IsValidTest.cpp"
>
</File>
<File
- RelativePath="..\..\..\tests\unit\operation\overlay\OverlayResultValidatorTest.cpp"
+ RelativePath="..\..\..\tests\unit\operation\valid\ValidClosedRingTest.cpp"
>
</File>
- </Filter>
- <Filter
- Name="union"
- >
<File
- RelativePath="..\..\..\tests\unit\operation\union\CascadedPolygonUnionTest.cpp"
+ RelativePath="..\..\..\tests\unit\operation\valid\ValidSelfTouchingRingFormingHoleTest.cpp"
>
</File>
</Filter>
@@ -420,14 +492,6 @@
Name="precision"
>
<File
- RelativePath="..\..\..\tests\unit\precision\GeometrySnapperTest.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\tests\unit\precision\LineStringSnapperTest.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\tests\unit\precision\SimpleGeometryPrecisionReducerTest.cpp"
>
</File>
@@ -448,6 +512,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\..\tests\unit\capi\GEOSContainsTest.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\tests\unit\capi\GEOSCoordSeqTest.cpp"
>
</File>
@@ -464,6 +532,10 @@
>
</File>
<File
+ RelativePath="..\..\..\tests\unit\capi\GEOSPreparedGeometryTest.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\tests\unit\capi\GEOSSimplifyTest.cpp"
>
</File>
@@ -480,6 +552,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\..\tests\unit\capi\GEOSWithinTest.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\tests\unit\capi\threadtest.c"
>
<FileConfiguration
Modified: trunk/source/Makefile.vc
===================================================================
--- trunk/source/Makefile.vc 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/source/Makefile.vc 2009-06-04 15:01:08 UTC (rev 2538)
@@ -31,6 +31,8 @@
EXT = $(OBJ_EXT)
OBJ = \
+ algorithm\Angle.$(EXT) \
+ algorithm\BoundaryNodeRule.$(EXT) \
algorithm\CentroidArea.$(EXT) \
algorithm\CentroidLine.$(EXT) \
algorithm\CentroidPoint.$(EXT) \
@@ -49,6 +51,8 @@
algorithm\RobustDeterminant.$(EXT) \
algorithm\SimplePointInRing.$(EXT) \
algorithm\SIRtreePointInRing.$(EXT) \
+ algorithm\distance\DiscreteHausdorffDistance.$(EXT) \
+ algorithm\distance\DistanceToPoint.$(EXT) \
algorithm\locate\IndexedPointInAreaLocator.$(EXT) \
algorithm\locate\PointOnGeometryLocator.$(EXT) \
algorithm\locate\SimplePointInAreaLocator.$(EXT) \
@@ -74,6 +78,7 @@
geom\Polygon.$(EXT) \
geom\PrecisionModel.$(EXT) \
geom\Triangle.$(EXT) \
+ geom\util\ComponentCoordinateExtracter.$(EXT) \
geom\util\CoordinateOperation.$(EXT) \
geom\util\GeometryEditor.$(EXT) \
geom\util\GeometryTransformer.$(EXT) \
@@ -162,6 +167,7 @@
io\WKTReader.$(EXT) \
io\WKTWriter.$(EXT) \
io\Writer.$(EXT) \
+ noding\BasicSegmentString.$(EXT) \
noding\FastNodingValidator.$(EXT) \
noding\FastSegmentSetIntersectionFinder.$(EXT) \
noding\IntersectionAdder.$(EXT) \
@@ -172,6 +178,7 @@
noding\NodedSegmentString.$(EXT) \
noding\NodingValidator.$(EXT) \
noding\Octant.$(EXT) \
+ noding\OrientedCoordinateArray.$(EXT) \
noding\ScaledNoder.$(EXT) \
noding\SegmentIntersectionDetector.$(EXT) \
noding\SegmentNode.$(EXT) \
@@ -187,7 +194,9 @@
operation\GeometryGraphOperation.$(EXT) \
operation\IsSimpleOp.$(EXT) \
operation\buffer\BufferBuilder.$(EXT) \
- operation\buffer\BufferOp.$(EXT) \
+ operation\buffer\BufferInputLineSimplifier.$(EXT) \
+ operation\buffer\BufferParameters.$(EXT) \
+ operation\buffer\BufferOp.$(EXT)
operation\buffer\BufferSubgraph.$(EXT) \
operation\buffer\OffsetCurveBuilder.$(EXT) \
operation\buffer\OffsetCurveSetBuilder.$(EXT) \
@@ -206,16 +215,20 @@
operation\overlay\EdgeSetNoder.$(EXT) \
operation\overlay\ElevationMatrix.$(EXT) \
operation\overlay\ElevationMatrixCell.$(EXT) \
- operation\overlay\FuzzyPointLocator.$(EXT) \
operation\overlay\LineBuilder.$(EXT) \
operation\overlay\MaximalEdgeRing.$(EXT) \
operation\overlay\MinimalEdgeRing.$(EXT) \
- operation\overlay\OffsetPointGenerator.$(EXT) \
operation\overlay\OverlayNodeFactory.$(EXT) \
operation\overlay\OverlayOp.$(EXT) \
- operation\overlay\OverlayResultValidator.$(EXT) \
operation\overlay\PointBuilder.$(EXT) \
operation\overlay\PolygonBuilder.$(EXT) \
+ operation\overlay\snap\GeometrySnapper.$(EXT) \
+ operation\overlay\snap\LineStringSnapper.$(EXT) \
+ operation\overlay\snap\SnapOverlayOp.$(EXT) \
+ operation\overlay\snap\SnapIfNeededOverlayOp.$(EXT) \
+ operation\overlay\validate\FuzzyPointLocator.$(EXT) \
+ operation\overlay\validate\OffsetPointGenerator.$(EXT) \
+ operation\overlay\validate\OverlayResultValidator.$(EXT) \
operation\polygonize\PolygonizeDirectedEdge.$(EXT) \
operation\polygonize\PolygonizeEdge.$(EXT) \
operation\polygonize\EdgeRing.$(EXT) \
@@ -235,6 +248,7 @@
operation\union\CascadedPolygonUnion.$(EXT) \
operation\valid\ConnectedInteriorTester.$(EXT) \
operation\valid\ConsistentAreaTester.$(EXT) \
+ operation\valid\IndexedNestedRingTester.$(EXT) \
operation\valid\IsValidOp.$(EXT) \
operation\valid\QuadtreeNestedRingTester.$(EXT) \
operation\valid\RepeatedPointTester.$(EXT) \
@@ -253,8 +267,6 @@
precision\CommonBitsOp.$(EXT) \
precision\CommonBitsRemover.$(EXT) \
precision\EnhancedPrecisionOp.$(EXT) \
- precision\GeometrySnapper.$(EXT) \
- precision\LineStringSnapper.$(EXT) \
precision\SimpleGeometryPrecisionReducer.$(EXT) \
simplify\DouglasPeuckerLineSimplifier.$(EXT) \
simplify\DouglasPeuckerSimplifier.$(EXT) \
Modified: trunk/source/geom/LinearRing.cpp
===================================================================
--- trunk/source/geom/LinearRing.cpp 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/source/geom/LinearRing.cpp 2009-06-04 15:01:08 UTC (rev 2538)
@@ -24,6 +24,7 @@
#include <geos/geom/GeometryFactory.h>
#include <geos/util/IllegalArgumentException.h>
+#include <cassert>
#include <sstream>
#include <string>
#include <memory>
Modified: trunk/source/headers/geos/algorithm/distance/DiscreteHausdorffDistance.h
===================================================================
--- trunk/source/headers/geos/algorithm/distance/DiscreteHausdorffDistance.h 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/source/headers/geos/algorithm/distance/DiscreteHausdorffDistance.h 2009-06-04 15:01:08 UTC (rev 2538)
@@ -28,6 +28,7 @@
#include <geos/geom/CoordinateFilter.h> // for inheritance
#include <geos/geom/CoordinateSequenceFilter.h> // for inheritance
+#include <cstddef>
#include <vector>
namespace geos {
@@ -183,12 +184,12 @@
const geom::Geometry& geom, double fraction)
:
geom(geom),
- numSubSegs( size_t(round(1.0/fraction)) )
+ numSubSegs( std::size_t(util::round(1.0/fraction)) )
{
}
void filter_ro(const geom::CoordinateSequence& seq,
- size_t index);
+ std::size_t index);
bool isGeometryChanged() const { return false; }
@@ -202,7 +203,7 @@
PointPairDistance maxPtDist;
PointPairDistance minPtDist;
const geom::Geometry& geom;
- size_t numSubSegs; // = 0;
+ std::size_t numSubSegs; // = 0;
};
Modified: trunk/source/index/chain/MonotoneChainBuilder.cpp
===================================================================
--- trunk/source/index/chain/MonotoneChainBuilder.cpp 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/source/index/chain/MonotoneChainBuilder.cpp 2009-06-04 15:01:08 UTC (rev 2538)
@@ -22,6 +22,7 @@
#include <geos/geom/CoordinateSequence.h>
#include <geos/geomgraph/Quadrant.h>
+#include <cassert>
#include <cstdio>
#include <vector>
Modified: trunk/tests/unit/operation/valid/IsValidTest.cpp
===================================================================
--- trunk/tests/unit/operation/valid/IsValidTest.cpp 2009-06-04 14:59:50 UTC (rev 2537)
+++ trunk/tests/unit/operation/valid/IsValidTest.cpp 2009-06-04 15:01:08 UTC (rev 2538)
@@ -65,7 +65,8 @@
bool valid = isValidOp.isValid();
TopologyValidationError* err = isValidOp.getValidationError();
- const Coordinate& errCoord = err->getCoordinate();
+ ensure(0 != err);
+ const Coordinate& errCoord = err->getCoordinate();
ensure_equals( err->getErrorType(),
TopologyValidationError::eInvalidCoordinate );
More information about the geos-commits
mailing list