Skip to content

v0.2.55..v0.2.56 changeset MapProjector.h

Garret Voltz edited this page Aug 14, 2020 · 3 revisions
diff --git a/hoot-core/src/main/cpp/hoot/core/util/MapProjector.h b/hoot-core/src/main/cpp/hoot/core/util/MapProjector.h
index 11f6c87..9ef634c 100644
--- a/hoot-core/src/main/cpp/hoot/core/util/MapProjector.h
+++ b/hoot-core/src/main/cpp/hoot/core/util/MapProjector.h
@@ -90,7 +90,8 @@ public:
   /**
    * Returns a vector of all candidate planar projections for a given envelope.
    */
-  std::vector<std::shared_ptr<OGRSpatialReference>> createAllPlanarProjections(const OGREnvelope& env);
+  std::vector<std::shared_ptr<OGRSpatialReference>> createAllPlanarProjections(
+    const OGREnvelope& env);
 
   /**
    * Using a predefined set of projections this method evaluates each one of them for both distance
@@ -171,6 +172,13 @@ private:
     Meters distanceError;
     Radians angleError;
     double score;
+
+    QString toString() const
+    {
+      return
+        "Distance Error: " + QString::number(distanceError) + ", Angle Error: " +
+        QString::number(angleError) + ", Score: " + QString::number(score);
+    }
   };
 
   static std::shared_ptr<MapProjector> _theInstance;
@@ -185,8 +193,6 @@ private:
   bool _evaluateProjection(const OGREnvelope& env, const std::shared_ptr<OGRSpatialReference>& srs,
     Meters testDistance, Meters& maxDistanceError, Radians& maxAngleError);
 
-  size_t _findBestResult(std::vector<PlanarTestResult>& results);
-
   size_t _findBestScore(std::vector<PlanarTestResult>& results);
 
   static bool _scoreLessThan(const PlanarTestResult& p1, const PlanarTestResult& p2);
Clone this wiki locally