From 4be5747eb9a626f4f38f256d1eb0fd1acfdcdc40 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 4 Jun 2014 12:40:03 +0200 Subject: [PATCH] [GeoLib] SimplePolygonTree::insertSimplePolygonTree(): Use existing, correct working code. --- GeoLib/SimplePolygonTree.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/GeoLib/SimplePolygonTree.cpp b/GeoLib/SimplePolygonTree.cpp index 8065a57fd00..0c6796cdfb0 100644 --- a/GeoLib/SimplePolygonTree.cpp +++ b/GeoLib/SimplePolygonTree.cpp @@ -52,15 +52,7 @@ void SimplePolygonTree::insertSimplePolygonTree (SimplePolygonTree* polygon_hier bool nfound (true); for (std::list<SimplePolygonTree*>::const_iterator it (_childs.begin()); it != _childs.end() && nfound; ++it) { - // check all points of polygon - size_t n_pnts_polygon (polygon->getNumberOfPoints()), cnt(0); - for (size_t k(0); k < n_pnts_polygon && cnt == k; k++) { - if (((*it)->getPolygon())->isPntInPolygon (*(polygon->getPoint(k)))) { - cnt++; - } - } - // all points of the given polygon are contained in the current polygon - if (cnt == n_pnts_polygon) { + if (((*it)->getPolygon())->isPolylineInPolygon (*(polygon))) { (*it)->insertSimplePolygonTree (polygon_hierarchy); nfound = false; } -- GitLab