OSMDownload is a utility class for downloading OpenStreetMap via Overpass API.
More...
|
| QgsOSMDownload () |
|
| ~QgsOSMDownload () |
|
bool | abort () |
| Aborts current pending request. More...
|
|
QString | errorString () const |
|
bool | hasError () const |
|
bool | isFinished () const |
| Returns true if the request has already finished. More...
|
|
QString | outputFileName () const |
|
QString | query () const |
|
QString | serviceUrl () const |
|
void | setOutputFileName (const QString &outputFileName) |
|
void | setQuery (const QString &query) |
|
void | setServiceUrl (const QString &serviceUrl) |
|
bool | start () |
| Starts network request for data. More...
|
|
| QObject (QObject *parent) |
|
| QObject (QObject *parent, const char *name) |
|
virtual | ~QObject () |
|
bool | blockSignals (bool block) |
|
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
|
const QObjectList & | children () const |
|
const char * | className () const |
|
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
|
void | deleteLater () |
|
void | destroyed (QObject *obj) |
|
bool | disconnect (const QObject *receiver, const char *method) |
|
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
|
void | dumpObjectInfo () |
|
void | dumpObjectTree () |
|
QList< QByteArray > | dynamicPropertyNames () const |
|
virtual bool | event (QEvent *e) |
|
virtual bool | eventFilter (QObject *watched, QEvent *event) |
|
T | findChild (const QString &name) const |
|
QList< T > | findChildren (const QRegExp ®Exp) const |
|
QList< T > | findChildren (const QString &name) const |
|
bool | inherits (const char *className) const |
|
void | insertChild (QObject *object) |
|
void | installEventFilter (QObject *filterObj) |
|
bool | isA (const char *className) const |
|
bool | isWidgetType () const |
|
void | killTimer (int id) |
|
virtual const QMetaObject * | metaObject () const |
|
void | moveToThread (QThread *targetThread) |
|
const char * | name () const |
|
const char * | name (const char *defaultName) const |
|
QString | objectName () const |
|
QObject * | parent () const |
|
QVariant | property (const char *name) const |
|
void | removeChild (QObject *object) |
|
void | removeEventFilter (QObject *obj) |
|
void | setName (const char *name) |
|
void | setObjectName (const QString &name) |
|
void | setParent (QObject *parent) |
|
bool | setProperty (const char *name, const QVariant &value) |
|
bool | signalsBlocked () const |
|
int | startTimer (int interval) |
|
QThread * | thread () const |
|
|
static QString | defaultServiceUrl () |
| Return URL of the service that is used by default. More...
|
|
static QString | queryFromRect (const QgsRectangle &rect) |
| Create query (in Overpass Query Language) that fetches everything in given rectangle. More...
|
|
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
|
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
|
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
|
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
|
QString | tr (const char *sourceText, const char *disambiguation, int n) |
|
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
|
OSMDownload is a utility class for downloading OpenStreetMap via Overpass API.
To use this class, it is necessary to set query, output file name and start the request. The interface is asynchronous, the caller has to wait for finished() signal that is emitted whe the request has finished (successfully or with an error).
To check whether the the request has been successful, check hasError() and use errorString() to retrieve error message. An error may happen either directly in start() method or during the network communication.
By default OSMDownload uses remote service at location returned by defaultServiceUrl() method.
Definition at line 39 of file qgsosmdownload.h.
bool QgsOSMDownload::start |
( |
| ) |
|
Starts network request for data.
The prerequisite is that the query string and output file name have been set.
Only one request may be pending at one point - if you need more requests at once, use several instances.
- Returns
- true if the network request has been issued, false otherwise (and sets error string)
Definition at line 55 of file qgsosmdownload.cpp.