Skip to content

v0.2.49..v0.2.50 changeset TileBoundsCalculator.h

Garret Voltz edited this page Nov 6, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/tile/TileBoundsCalculator.h b/hoot-core/src/main/cpp/hoot/core/conflate/tile/TileBoundsCalculator.h
index b1ab629..70a6459 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/tile/TileBoundsCalculator.h
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/tile/TileBoundsCalculator.h
@@ -147,8 +147,21 @@ public:
 
   TileBoundsCalculator(double pixelSize);
 
+  /**
+   * Calculates a set of rectangular bounding boxes that at most contain a configured set of nodes;
+   * strives to return a set of tiles with the most balanced number of nodes possible
+   *
+   * @return a grid of tile bounding boxes
+   */
   std::vector<std::vector<geos::geom::Envelope>> calculateTiles();
 
+  /**
+   * Returns the node counts for each computed tile bounding box
+   *
+   * @return a grid of node counts
+   */
+  std::vector<std::vector<long>> getNodeCounts() const { return _nodeCounts; }
+
   void renderImage(const std::shared_ptr<OsmMap>& map);
 
   void renderImage(const std::shared_ptr<OsmMap>& map, cv::Mat& r1, cv::Mat& r2);
@@ -189,6 +202,7 @@ private:
   int32_t _maxValue;
   long _maxNodeCountInOneTile;
   long _minNodeCountInOneTile;
+  std::vector<std::vector<long>> _nodeCounts;
 
   void _calculateMin();
 
Clone this wiki locally