Skip to content

v0.2.53..v0.2.54 changeset RubberSheet.cpp

Garret Voltz edited this page Mar 31, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/algorithms/rubber-sheet/RubberSheet.cpp b/hoot-core/src/main/cpp/hoot/core/algorithms/rubber-sheet/RubberSheet.cpp
index fa46996..92fa37d 100644
--- a/hoot-core/src/main/cpp/hoot/core/algorithms/rubber-sheet/RubberSheet.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/algorithms/rubber-sheet/RubberSheet.cpp
@@ -39,6 +39,8 @@
 #include <hoot/core/visitors/WorstCircularErrorVisitor.h>
 #include <hoot/core/util/StringUtils.h>
 #include <hoot/core/index/OsmMapIndex.h>
+#include <hoot/core/criterion/LinearCriterion.h>
+#include <hoot/core/criterion/PolygonCriterion.h>
 
 // Tgs
 #include <tgs/Statistics/Normal.h>
@@ -143,12 +145,19 @@ void RubberSheet::apply(std::shared_ptr<OsmMap>& map)
   if (_maxAllowedWays != -1 && map->getWayCount() > _maxAllowedWays)
   {
     LOG_WARN(
-      "Skipping rubber sheeting with map having " <<
-      StringUtils::formatLargeNumber(map->getWayCount()) << " ways and the "
-      "maximum allowed to rubber sheet by configuration is: " <<
-      StringUtils::formatLargeNumber(_maxAllowedWays) << ".");
+      "Skipping rubber sheeting of map having " <<
+      StringUtils::formatLargeNumber(map->getWayCount()) << " ways out of a " <<
+      StringUtils::formatLargeNumber(_maxAllowedWays) <<
+      " maximum allowed for rubber sheeting.");
     return;
   }
+  else
+  {
+    LOG_INFO(
+      "Proceeding to rubber sheet map having " <<
+      StringUtils::formatLargeNumber(map->getWayCount()) << " ways out of a " <<
+      StringUtils::formatLargeNumber(_maxAllowedWays) << " maximum allowed for rubber sheeting.");
+  }
 
   std::shared_ptr<OGRSpatialReference> oldSrs = _projection;
   calculateTransform(map);
@@ -592,4 +601,12 @@ vector<double> RubberSheet::calculateTiePointDistances()
   return tiePointDistances;
 }
 
+QStringList RubberSheet::getCriteria() const
+{
+  QStringList criteria;
+  criteria.append(QString::fromStdString(LinearCriterion::className()));
+  criteria.append(QString::fromStdString(PolygonCriterion::className()));
+  return criteria;
+}
+
 }
Clone this wiki locally