2

Update: While this question does point to available style guides my question is more how to go about similar operation by yourself and associating your own symbols with osm maps

I downloaded OSM based maps from GeoFabrik and my question is how to associate the symbols shown in the screen shot with the fclass attribute automatically so vectors of ftype type "Motorway","Primary" etc all use the appropriate symbol I tried changing the symbol type to Categorized by ftype but that still meant I had to manually edit each one and pick the correct symbol.

p.s. are the symbols included in the osm file or are they common to qgis?

Qgis osm road symbols

  • 1
    Don't think style files (particularly for QGIS) come with the datasets. This post contains several links to style files made specifically for OSM layers which might help: Is there a good qml or sld file available for QGIS + Openstreetmap data? – Joseph May 19 '17 at 10:14
  • I'm not looking for new styles, just to ensure the 33 symbols shown in the image are associated with the relevant osm road/line without having to manually edit each categorized item individually after categorisation – Michael May 19 '17 at 10:18
  • Seems like github.com/charleyglynn/OSM-Shapefile-QGIS-stylesheets has the work done already – Michael May 19 '17 at 11:02
  • If you change Single symbol to Categorized, select your fclass field as column then click Classify. This should load a symbol for each value in your field. Then click the Advanced > Match to saved symbols. This will match the values of the field to the names of the symbols (note that this is case-sensitive). – Joseph May 19 '17 at 11:36
  • 1
    @Joseph If you post your comments as a question i can mark it as the answer – Michael May 20 '17 at 11:59
1

If you want to match the features you have in your layer with the symbols shown in your image then you could:

  1. Change Single symbol to Categorized.
  2. Ensure the fclass field contains values which are title-cased (i.e. values which are lower case but begin with a capitalised letter). If you run the Field Calculator, either update the fclass field or create a new string field and use the expression:

    title("fclass")
    
  3. Select your fclass field as column then click Classify. This should load a symbol for each value in your field. Then from your image, go to

    Advanced > Match to saved symbols
    

    This will match the values of the field to the names of the symbols.

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.