Patrick Brosi 4 years ago
parent
commit
b27fac87bc
1 changed files with 9 additions and 19 deletions
  1. 9 19
      src/osmfixer/index/StatIdx.cpp

+ 9 - 19
src/osmfixer/index/StatIdx.cpp

@@ -252,7 +252,7 @@ void StatIdx::addStation(int64_t osmid, const util::geo::DLine& geom,
252
 
252
 
253
 // _____________________________________________________________________________
253
 // _____________________________________________________________________________
254
 void StatIdx::addGroup(size_t osmid, const OsmAttrs& attrs) {
254
 void StatIdx::addGroup(size_t osmid, const OsmAttrs& attrs) {
255
-  if (osmid > 1) _numOSMGroups++;
255
+  if (osmid > 2) _numOSMGroups++;
256
   Group g;
256
   Group g;
257
   g.id = _groups.size();
257
   g.id = _groups.size();
258
   g.osmid = osmid;
258
   g.osmid = osmid;
@@ -901,26 +901,13 @@ void StatIdx::initSuggestions() {
901
             sug.arrow = getGroupArrow(centroid, b);
901
             sug.arrow = getGroupArrow(centroid, b);
902
 
902
 
903
             _numMV++;
903
             _numMV++;
904
-          } else {
905
-            continue;
906
-            // size_t metaId =
907
-            // getGroup(getGroup(stat.origGroup)->mergeId)->metaGroupId;
908
-            // if (metaId) {
909
-            // sug.type = 10;
910
-            // sug.target_gid = metaId;
911
-            // sug.target_osm_rel_id = metaId;
912
-            // } else {
913
-            // sug.type = 9;
914
-            // sug.target_gid = stat.group;
915
-            // sug.target_osm_rel_id = getGroup(stat.group)->osmid;
916
-            // }
917
-          }
918
 
904
 
919
-          sug.orig_gid = stat.origGroup;
920
-          sug.orig_osm_rel_id = getGroup(stat.origGroup)->osmid;
905
+            sug.orig_gid = stat.origGroup;
906
+            sug.orig_osm_rel_id = getGroup(stat.origGroup)->osmid;
921
 
907
 
922
-          _suggestions.push_back(sug);
923
-          stat.suggestions.push_back(_suggestions.size() - 1);
908
+            _suggestions.push_back(sug);
909
+            stat.suggestions.push_back(_suggestions.size() - 1);
910
+          }
924
         } else if (!hasStationTrackHeur) {
911
         } else if (!hasStationTrackHeur) {
925
           // move station out of relation
912
           // move station out of relation
926
           //
913
           //
@@ -947,6 +934,9 @@ void StatIdx::initSuggestions() {
947
 
934
 
948
     if (stat.suggestions.size() + stat.attrErrs.size() == 0) _numOK++;
935
     if (stat.suggestions.size() + stat.attrErrs.size() == 0) _numOK++;
949
   }
936
   }
937
+
938
+  // meta groups are always ok
939
+  _numOK += _numOSMMetaGroups;
950
 }
940
 }
951
 
941
 
952
 // _____________________________________________________________________________
942
 // _____________________________________________________________________________