Patrick Brosi 4 년 전
부모
커밋
b27fac87bc
1개의 변경된 파일9개의 추가작업 그리고 19개의 파일을 삭제
  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 254
 void StatIdx::addGroup(size_t osmid, const OsmAttrs& attrs) {
255
-  if (osmid > 1) _numOSMGroups++;
255
+  if (osmid > 2) _numOSMGroups++;
256 256
   Group g;
257 257
   g.id = _groups.size();
258 258
   g.osmid = osmid;
@@ -901,26 +901,13 @@ void StatIdx::initSuggestions() {
901 901
             sug.arrow = getGroupArrow(centroid, b);
902 902
 
903 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 911
         } else if (!hasStationTrackHeur) {
925 912
           // move station out of relation
926 913
           //
@@ -947,6 +934,9 @@ void StatIdx::initSuggestions() {
947 934
 
948 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
 // _____________________________________________________________________________