4

I am trying to download OSM data into QGIS in a way that is as close as possible to what it looks like in JOSM. I am doing a visual comparison between OSM data and satellite images. One of the things I am looking at is comparing if one-ways are mapped correctly. How can I get the OSM data in QGIS in a way that shows the direction of a road as it would in JOSM?

1
  • If you use OSM tile server, i think you can't do it. What about to download OSM vector data and add style? (geofabrik.de)
    – Zoltan
    Sep 21, 2015 at 7:55

1 Answer 1

4

You can get OSM data into QGIS with the QuickOSM plugin.

Under Web -> QuickOSM -> QuickOSM, go to the OSM file section. Look for the path to the osmconf.ini file, search it with your explorer, and open it with a good text editor like notepad++.

In the [lines] section, go to the attributes line, and add ,oneway at the end. Save the file and close it.

Back in the QuickOSM panel, go to the Quick query tab and enter highway in the key field. Using the Openlayers plugin, navigate to your place of interest, and run the query.

You can remove the node and multipolygon layers, and save the temporary lines layer to a shapefile on disk.

Now you need a special style for the oneways.

Rightclick on the lines layer, Properties..., go to the Styles tab, and change the style from Single Symbol to Categorized on column oneway. Click on Classifyand see what values you get.

In the line with yes, double-click on the symbol, and add a new line with the green +. Select the added line, change the symbol layer type from Simple line to Marker line. select the Simple Markerline, and select >as the symbol.

If you have oneways with -1 or value, you have to rotate the symbol by 180°. You might have a look at http://wiki.openstreetmap.org/wiki/Key:oneway#Implied_oneway_restriction too.

You can style the highways with empty oneway field different, and you will get this result:

enter image description here

If you don't want to see footways etc, you can filter the dataset with

NOT ("highway"  = 'bridleway'  OR "highway" = 'cycleway' OR "highway" = 'footway' OR "highway" = 'path' OR "highway" = 'steps' OR "highway" = 'track')
3
  • 1
    Thank you so much! I really deeply appreciate the help! Very useful.
    – BmanS
    Sep 21, 2015 at 21:30
  • How can I show the nodes that are at the intersection of two roads? This is useful, because how will I know by just looking at the downloaded data from OSM into QGIS that the crossing of the two roads are an intersection or a bridge? In OSM a node shows that there is an intersection and that a car can turn from the one road onto the other, if the node is not there a car cannot turn, this is the case with a bridge.
    – BmanS
    Sep 22, 2015 at 20:23
  • This can be determined by the layer tag. But on this site there should be one question per topic, so you better open up a new one.
    – AndreJ
    Sep 23, 2015 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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