From ce538ff668c9b8282c8cfb9c1938a43fa627173a Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Mon, 8 Jan 2024 14:31:32 -0800 Subject: [PATCH] synch code with JTS --- src/algorithm/PointLocator.cpp | 3 +-- src/geomgraph/GeometryGraph.cpp | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) 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)); } }