3

I have a problem with using the QGIS modeler to split a downloaded .osm file into layers. What I am trying to achieve is a structure like this:

  • Traffic (lines)
    • Main Roads
    • Roads
    • Small Roads
  • Natural (polygons)
    • Farmland
    • Forest
  • Symbols (points)
    • Church
    • School

... as well as applying a predefined .qml style to each layer.

What I have tried: I've tried installing the QuickOSM plugin and using its functions in the QGIS modeler. I wanted to split the (offline) OSM file into layers (with attributes for further processing) (see image):

enter image description here

What I get when executing this (simple) command is this:

An error has occured while executing Python code:

TypeError: cannot deepcopy this pattern object

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version: 2.12.2-Lyon Lyon, b403532

Am I doing something wrong using the QGIS modeler? To me this operation seems logical: Take the OSM file and split it into points, polygons, multipolygons and lines.

Is there a workaround for this bug?

I have submitted a bug report (https://github.com/3liz/QuickOSM/issues/78), but in the meantime I thought of using a SpatiaLite DB as a solution. Now my question is:

  • How can I create layers from queries to the SpatiaLite DB inside the QGIS modeler? I know SQL, but which tables should I look at (I need the tags as well as the geometry) and which algorithm should I use? (I do not know what every QGIS algorithm does, this is why I tried the QuickOSM plugin, since it should do exactly this for me)
  • Welcome to gis.stackexchange. Please not that the format of this Q&A site requires us to stick to one question per thread. Please edit your post to focus on one question only. Feel free to post any additional question in additional threads. – underdark May 14 '16 at 16:45
  • @underdark : edited. My question is how to load the OSM data into layers (whether it be via a plugin, DB or some other workaround). – BiggCrazy May 14 '16 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.