KOSMIndoorMap

osmpbfparser.h
1/*
2 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KOSM_OSMPBFPARSER_H
8#define KOSM_OSMPBFPARSER_H
9
10#include "abstractreader.h"
11#include "datatypes.h"
12
13namespace OSMPBF {
14class PrimitiveBlock;
15class PrimitiveGroup;
16}
17
18namespace OSM {
19
20/** Parser of .osm.pbf files.
21 * @see https://wiki.openstreetmap.org/wiki/PBF_Format
22 */
24{
25public:
26 explicit OsmPbfParser(DataSet *dataSet);
27
28private:
29 void readFromData(const uint8_t *data, std::size_t len) override;
30
31 [[nodiscard]] bool parseBlob(const uint8_t *&it, const uint8_t *end);
32 void parsePrimitiveBlock(const uint8_t *data, std::size_t len);
33 void parseDenseNodes(const OSMPBF::PrimitiveBlock &block, const OSMPBF::PrimitiveGroup &group);
34 void parseWays(const OSMPBF::PrimitiveBlock &block, const OSMPBF::PrimitiveGroup &group);
35 void parseRelations(const OSMPBF::PrimitiveBlock &block, const OSMPBF::PrimitiveGroup &group);
36
37 QByteArray m_zlibBuffer;
38};
39
40}
41
42#endif // KOSM_OSMPBFPARSER_H
Abstract base class for OSM file format readers.
A set of nodes, ways and relations.
Definition datatypes.h:346
Parser of .osm.pbf files.
Low-level types and functions to work with raw OSM data as efficiently as possible.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.