File indexing completed on 2024-12-01 09:46:07
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Thibaut Gridel <tgridel@free.fr> 0004 // SPDX-FileCopyrightText: 2011 Konstantin Oblaukhov <oblaukhov.konstantin@gmail.com> 0005 // SPDX-FileCopyrightText: 2014 Bernhard Beschow <bbeschow@cs.tu-berlin.de> 0006 // SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org> 0007 // 0008 0009 #ifndef OSMPARSER_H 0010 #define OSMPARSER_H 0011 0012 #include "OsmNode.h" 0013 #include "OsmWay.h" 0014 #include "OsmRelation.h" 0015 0016 #include <QString> 0017 0018 namespace Marble { 0019 0020 class GeoDataDocument; 0021 0022 class OsmParser 0023 { 0024 public: 0025 static GeoDataDocument* parse(const QString &filename, QString &error); 0026 0027 private: 0028 static GeoDataDocument* parseXml(const QString &filename, QString &error); 0029 static GeoDataDocument* parseO5m(const QString &filename, QString &error); 0030 static GeoDataDocument* parseOsmPbf(const QString &filename, QString &error); 0031 static GeoDataDocument *createDocument(OsmNodes &nodes, OsmWays &way, OsmRelations &relations); 0032 }; 0033 0034 } 0035 0036 #endif // OSMPARSER_H