diff --git a/src/algorithm/PointLocator.cpp b/src/algorithm/PointLocator.cpp index 7208a82a51..7fa7dd7e36 100644 --- a/src/algorithm/PointLocator.cpp +++ b/src/algorithm/PointLocator.cpp @@ -75,11 +75,10 @@ void PointLocator::computeLocation(const CoordinateXY& p, const Geometry* geom) { //-- handle empty elements - /* if (geom->isEmpty()) { return; } -*/ + GeometryTypeId geomTypeId = geom->getGeometryTypeId(); switch (geomTypeId) { diff --git a/src/geomgraph/GeometryGraph.cpp b/src/geomgraph/GeometryGraph.cpp index 1c8e57a9a4..b1b2e53f1a 100644 --- a/src/geomgraph/GeometryGraph.cpp +++ b/src/geomgraph/GeometryGraph.cpp @@ -208,10 +208,7 @@ void GeometryGraph::addCollection(const GeometryCollection* gc) { for(std::size_t i = 0, n = gc->getNumGeometries(); i < n; ++i) { - const Geometry* g = gc->getGeometryN(i); - if (! g->isEmpty()) { - add(g); - } + add(gc->getGeometryN(i)); } }