1
+ /* **************************************************************************
2
+ qgsosmimport.h
3
+ --------------------------------------
4
+ Date : January 2013
5
+ Copyright : (C) 2013 by Martin Dobias
6
+ Email : wonder dot sk at gmail dot com
7
+ ***************************************************************************
8
+ * *
9
+ * This program is free software; you can redistribute it and/or modify *
10
+ * it under the terms of the GNU General Public License as published by *
11
+ * the Free Software Foundation; either version 2 of the License, or *
12
+ * (at your option) any later version. *
13
+ * *
14
+ ***************************************************************************/
15
+
1
16
#ifndef OSMIMPORT_H
2
17
#define OSMIMPORT_H
3
18
8
23
9
24
class QXmlStreamReader ;
10
25
11
-
26
+ /* *
27
+ * @brief The QgsOSMXmlImport class imports OpenStreetMap XML format to our topological representation
28
+ * in a SQLite database (see QgsOSMDatabase for details).
29
+ *
30
+ * How to use the classs:
31
+ * 1. set input XML file name and output DB file name (in constructor or with respective functions)
32
+ * 2. run import()
33
+ * 3. check errorString() if the import failed
34
+ */
12
35
class ANALYSIS_EXPORT QgsOSMXmlImport : public QObject
13
36
{
14
37
Q_OBJECT
@@ -21,6 +44,10 @@ class ANALYSIS_EXPORT QgsOSMXmlImport : public QObject
21
44
void setOutputDbFileName ( const QString& dbFileName ) { mDbFileName = dbFileName; }
22
45
QString outputDbFileName () const { return mDbFileName ; }
23
46
47
+ /* *
48
+ * Run import. This will parse the XML file and store the data in a SQLite database.
49
+ * @return true on success, false when import failed (see errorString() for the error)
50
+ */
24
51
bool import ();
25
52
26
53
bool hasError () const { return !mError .isEmpty (); }
0 commit comments