Skip to content

v0.2.51..v0.2.52 changeset OsmMapIndex.cpp

Garret Voltz edited this page Jan 15, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/index/OsmMapIndex.cpp b/hoot-core/src/main/cpp/hoot/core/index/OsmMapIndex.cpp
index 00f7351..c794937 100644
--- a/hoot-core/src/main/cpp/hoot/core/index/OsmMapIndex.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/index/OsmMapIndex.cpp
@@ -468,7 +468,6 @@ set<ElementId> OsmMapIndex::getParents(ElementId eid) const
   if (eid.getType() == ElementType::Node)
   {
     const set<long>& ways = getNodeToWayMap()->getWaysByNode(eid.getId());
-
     for (set<long>::const_iterator it = ways.begin(); it != ways.end(); ++it)
     {
       result.insert(ElementId::way(*it));
@@ -476,7 +475,6 @@ set<ElementId> OsmMapIndex::getParents(ElementId eid) const
   }
 
   const set<long>& ancestors = getElementToRelationMap()->getRelationByElement(eid);
-
   for (set<long>::const_iterator it = ancestors.begin(); it != ancestors.end(); ++it)
   {
     if (!_map.containsRelation(*it))
@@ -484,11 +482,11 @@ set<ElementId> OsmMapIndex::getParents(ElementId eid) const
       LOG_INFO("Child element: " << eid);
       LOG_INFO("Missing relation: " << *it);
       LOG_INFO("Child element: " << _map.getElement(eid)->toString());
+      // TODO: throw exception here or continue to next iteration?
     }
     // the map should contain all the relations returned by the index.
     assert(_map.containsRelation(*it));
     const ConstRelationPtr& r = _map.getRelation(*it);
-
     if (r->contains(eid))
     {
       result.insert(r->getElementId());
Clone this wiki locally