File indexing completed on 2023-09-24 04:01:03

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2016 Dennis Nienhüser <nienhueser@kde.org>
0004 //
0005 
0006 #ifndef PEAKANALYZER_H
0007 #define PEAKANALYZER_H
0008 
0009 #include <QVector>
0010 
0011 namespace Marble {
0012 
0013 class GeoDataPlacemark;
0014 
0015 class PeakAnalyzer
0016 {
0017 public:
0018     static void determineZoomLevel(const QVector<GeoDataPlacemark*> &placemarks);
0019 
0020 private:
0021     using Peaks = QVector<GeoDataPlacemark *>;
0022     using PeakCluster = QVector<GeoDataPlacemark *>;
0023     using PeakClusters = QVector<PeakCluster>;
0024 
0025     static Peaks peaksNear(const GeoDataPlacemark* placemark, const Peaks &peaks, double maxDistance);
0026     static void dbScan(const Peaks &peaks, double maxDistance, int minPoints);
0027 };
0028 
0029 }
0030 #endif