3

I've got a large .osm file I'd like to load into QGIS and stylise with some QML files I downloaded from the web (https://github.com/anitagraser/QGIS-resources/blob/master/qgis2/osm_spatialite).

The file itself is too large to directly import by the add vector layer tool (it's 6gb!), and I find the import from xml/export to spatial lite method quite time consuming, having to check all the tags that I'd like, and doing this process for points, lines and polygons. Perhaps I'm not doing this correctly?

In any case, I have this large .osm file, and I'd like to access the data and stylise based on the QML files I downloaded, what would be a method for doing this?

I'm using a mac.

Edit: it sounds like I need to thin the database out first. I'll play around a little more, and try to do the same on a smaller database and see if I have any luck!

  • 2
    Do you really need all 6GB? Perhaps some spatial subset or filtered set of tags would be useful. Or maybe import into postgis instead, although it will be quite a lot to import there too. – BradHards Aug 21 '16 at 4:58
  • Thanks Brad, I think this could be the problem, I'll have another go on a smaller database. – Lewis Aug 21 '16 at 11:28
2

You are doing everything correctly, it is just a huge amount of data.

The Add Vector layer tool basically does the same. Alternatively you could build a spatialite database with ogr2ogr on the command line, or a postgis database, which requires a bit more care on your side.

If you load all the data, and style them following Anita's blog, you will however encounter that it gets rather slow.

Alternatively, you can:

  1. Filter the dataset for the items or area you really need
  2. use pre-rendered tiles with the QuickMapServices plugin
  3. Do any combination of 1 and 2 (Points of your interest over a tile basemap)
  • Thanks Andre, I'll try both of those ideas and see how I go! – Lewis Aug 21 '16 at 11:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.