File indexing completed on 2024-07-21 09:27:10

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org>
0004 //
0005 
0006 #ifndef MARBLE_OSMNODE
0007 #define MARBLE_OSMNODE
0008 
0009 #include <osm/OsmPlacemarkData.h>
0010 #include <GeoDataPlacemark.h>
0011 
0012 #include <QString>
0013 
0014 class QXmlStreamAttributes;
0015 
0016 namespace Marble {
0017 
0018 class GeoDataDocument;
0019 
0020 class OsmNode {
0021 public:
0022     OsmPlacemarkData & osmData();
0023     void parseCoordinates(const QXmlStreamAttributes &attributes);
0024     void setCoordinates(const GeoDataCoordinates &coordinates);
0025 
0026     const GeoDataCoordinates & coordinates() const;
0027     const OsmPlacemarkData & osmData() const;
0028 
0029     GeoDataPlacemark* create() const;
0030 
0031 private:
0032     int populationIndex(qint64 population) const;
0033 
0034     OsmPlacemarkData m_osmData;
0035     GeoDataCoordinates m_coordinates;
0036 };
0037 
0038 typedef QHash<qint64,OsmNode> OsmNodes;
0039 
0040 }
0041 
0042 #endif