Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef OSMIUMHANDLERGRIDWRITER_H
- #define OSMIUMHANDLERGRIDWRITER_H
- // Osmium Includes
- #include <osmium.hpp>
- // Qt Includes
- #include <QStringList>
- #include <QString>
- #include <QDebug>
- #include <QMap>
- struct BoundingBox
- {
- double minLat;
- double maxLat;
- double minLon;
- double maxLon;
- };
- namespace Osmium
- {
- namespace Handler
- {
- class OsmiumHandlerGridWriter : public Base
- {
- struct NodeSchema
- {
- QString sStreetName;
- int sStreetAddr;
- double sLon;
- double sLat;
- };
- public:
- OsmiumHandlerGridWriter(QString);
- ~OsmiumHandlerGridWriter();
- void init(Osmium::OSM::Meta&);
- void before_nodes();
- void node(Osmium::OSM::Node*);
- void after_nodes();
- void before_ways();
- void way(Osmium::OSM::Way*);
- void after_ways();
- void before_relations();
- void relation(Osmium::OSM::Relation*);
- void after_relations();
- void area(Osmium::OSM::Area*);
- void final();
- private:
- QMap<qint64,NodeSchema> m_nodeMap;
- QList<Osmium::OSMFile*> m_fileList;
- QList<Osmium::Output::Base*> m_outputList;
- BoundingBox m_bbox;
- double m_midLat;
- double m_midLon;
- bool m_addNodeInfoToWayTags;
- QString m_filePath;
- QString m_parentQuadKey;
- qint64 m_nodeCount;
- qint64 m_wayCount;
- };
- }
- }
- #endif // OSMIUMHANDLERGRIDWRITER_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement