Unverified Commit 7dc7472e authored by AustinSanders's avatar AustinSanders Committed by GitHub
Browse files

CNetCombinePt: only log merged points (#4984)

* Adjusted logging functionality such that only merged points are present in log

* Updated changelog

* Added link to github issue

* Edited logging test to include number of logged points
parent d15126ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ release.
- Added check to determine if poles were a valid projection point in ImagePolygon when generating footprint for a map projected image. [#4390](https://github.com/USGS-Astrogeology/ISIS3/issues/4390)
- Fixed the Mars Express HRSC SRC camera and serial number to use the StartTime instead of the StartClockCount  [#4803](https://github.com/USGS-Astrogeology/ISIS3/issues/4803)
- Fixed algorithm for applying rolling shutter jitter. Matches implementation in USGSCSM.

- Fixed CNetCombinePt logging functionality such that only merged points are included in the log. [#4973](https://github.com/USGS-Astrogeology/ISIS3/issues/4973)

## [7.0.0] - 2022-02-11

+4 −2
Original line number Diff line number Diff line
@@ -278,6 +278,7 @@ namespace Isis{
    BigInt nfound(0);
    BigInt nMerged(0);
    BOOST_FOREACH ( ControlPoint *point, all_points ) {
      BigInt localFound(0);
      // Don't consider ignored or edit locked points
      if ( isWorthy( point ) ) {

@@ -298,10 +299,11 @@ namespace Isis{
            QList<PointType> m_points = m_cloud->radius_query(m_p, search_radius_sq);
            ControlPointMerger merger(image_tolerance);
            p_merged += merger.apply(point, m_points);
            nfound   += merger.size();
            localFound = merger.size();
            nfound   += localFound;

            // Log any points that were merged
            if (logMerges && nfound > 0) {
            if (logMerges && localFound > 0) {
              QHash<QString, QSet<QString>>::iterator logIt = mergeLog.find(point->GetId());
              // point hasn't had any points merged into it yet
              if (logIt == mergeLog.end()) {
+4 −1
Original line number Diff line number Diff line
@@ -251,7 +251,9 @@ TEST_F(CombineNetworks, FunctionalTestCnetcombineptLog) {
  QHash<QString, QSet<QString>> merges;
  QHash<QString, int> startSizes;
  QHash<QString, int> endSizes;
  short nLines = 0;
  while (!logFileHandle.atEnd()) {
    nLines++;
    QStringList splitLine = QString(logFileHandle.readLine()).trimmed().split(',');
    ASSERT_EQ(splitLine.size(), 4);
    startSizes.insert(splitLine[0], splitLine[1].toInt());
@@ -282,6 +284,7 @@ TEST_F(CombineNetworks, FunctionalTestCnetcombineptLog) {
  EXPECT_TRUE(merges["1b"].contains("3a"));
  EXPECT_TRUE(merges["1b"].contains("2b"));
  EXPECT_TRUE(merges["1b"].contains("3b"));
  EXPECT_EQ(nLines, 2);
}

TEST_F(CombineNetworks, FunctionalTestCnetcombineptList) {