[Qgis-developer] New OpenStreetMap integration

Martin Dobias wonder.sk at gmail.com
Thu Feb 28 13:35:33 PST 2013


Hi all

so finally I have pushed my initial work on OpenStreetMap integration
to master... d'oh I have missed The Open Data Day (Feb 23) by few
days! The idea is to completely replace the current OpenStreetMap
provider and plugin. As announced in the list before, the new OSM
support is read-only and right now I have no plans to add editing
functionality. Editing would mean a _lot_ of work - map tools,
tracking of changes, conflict resolution - and there are already great
programs for editing OSM data.

If you would like to test the new stuff, go to menu Vector >
OpenStreetMap. No need to enable any plugins. The workflow should be:
0. get OSM XML file (from web or download in GUI)
1. import XML file to a SQLite topology database (once)
2. export SpatiaLite layers from topology with a fixed set of tags - attributes

Integrated download uses Overpass API, so you should be able to
download data from any extent size. The download server in GUI is
currently fixed to overpass-api.de. When using download, make sure to
set high timeout (Options > Network > Timeout for network requests) -
currently there's a problem with QGIS network manager - it will time
out after the fixed time even if the data is being continuously
received.

The work is by no means complete, there are various pieces missing,
though it should be already usable. Some features I would like to add:
- advanced download queries (e.g. filtering by tags)
- filtering on export (e.g. export only railroads, only restaurants)
- python bindings
- support for relations
- identification GUI (e.g. see all tags, even those not exported)

There is a low-level API in qgis analysis library which should allow
3rd party tools/plugins do some work with OSM data (currently
QgsOSMDownload, QgsOSMXmlImport and QgsOSMDatabase classes).

Please let me know what do you think about it or if you encounter any bugs.

I will be removing the OSM provider+plugin very soon. This is another
piece from the master plan for removal of old symbology (OSM provider
implements a renderer based on old symbology).

Martin


More information about the Qgis-developer mailing list