[geos-commits] r3703 - trunk/tests/unit/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Jun 27 03:53:43 PDT 2012


Author: strk
Date: 2012-06-27 03:53:43 -0700 (Wed, 27 Jun 2012)
New Revision: 3703

Modified:
   trunk/tests/unit/capi/GEOSDelaunayTriangulationTest.cpp
Log:
Add test for Delaunay triangulation with a tolerance

Modified: trunk/tests/unit/capi/GEOSDelaunayTriangulationTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSDelaunayTriangulationTest.cpp	2012-06-27 10:43:33 UTC (rev 3702)
+++ trunk/tests/unit/capi/GEOSDelaunayTriangulationTest.cpp	2012-06-27 10:53:43 UTC (rev 3703)
@@ -169,6 +169,20 @@
 "MULTILINESTRING ((8.5 1, 10 10), (8 2, 10 10), (8 2, 8.5 1), (7 8, 10 10), (7 8, 8 2), (3 8, 10 10), (3 8, 7 8), (2 2, 8.5 1), (2 2, 8 2), (2 2, 7 8), (2 2, 3 8), (0.5 9, 10 10), (0.5 9, 3 8), (0.5 9, 2 2), (0 0, 8.5 1), (0 0, 2 2), (0 0, 0.5 9))"
         );
     }
+
+    // Four points with a tolerance making one collapse
+    template<>
+    template<>
+    void object::test<6>()
+    {
+        geom1_ = GEOSGeomFromWKT("MULTIPOINT(0 0, 10 0, 10 10, 11 10)");
+
+        GEOSGeom_destroy(geom2_);
+        geom2_ = GEOSDelaunayTriangulation(geom1_, 2, 1);
+        ensure_equals_wkt(geom2_, 
+"MULTILINESTRING ((10 0, 10 10), (0 0, 10 10), (0 0, 10 0))"
+        );
+    }
     
 } // namespace tut
 



More information about the geos-commits mailing list