Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)

To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
This commit is contained in:
Konstantin Pastbin
2025-04-13 16:37:30 +07:00
commit e3e4a1985a
12931 changed files with 13195100 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#pragma once
#include "geometry/latlon.hpp"
#include "geometry/mercator.hpp"
#include "geometry/rect2d.hpp"
#include <string>
#include <vector>
struct OsmElement;
class TownsDumper
{
public:
void CheckElement(OsmElement const & em);
void Dump(std::string const & filePath);
static double GetDistanceThreshold();
private:
void FilterTowns();
struct Town
{
ms::LatLon point;
uint64_t id;
bool capital;
uint64_t population;
Town(double lat, double lon, uint64_t id, bool isCapital, uint64_t population)
: point(lat, lon), id(id), capital(isCapital), population(population)
{
}
bool operator<(Town const & rhs) const { return population < rhs.population; }
m2::RectD GetLimitRect() const
{
auto const mercPt = mercator::FromLatLon(point);
return m2::RectD(mercPt, mercPt);
}
};
std::vector<Town> m_records;
};