User Tools

Site Tools


osm_qgis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
osm_qgis [2023/03/04 15:38] bushwalkingosm_qgis [2023/03/04 18:50] bushwalking
Line 48: Line 48:
 **Points:** attributes=name,barrier,highway,place,man_made,aeroway,amenity,tourism,information,ford,gate,leisure,natural,railway,waterway **Points:** attributes=name,barrier,highway,place,man_made,aeroway,amenity,tourism,information,ford,gate,leisure,natural,railway,waterway
  
-Other tags not listed will still be imported, but in a generic field called other_tags. You will still be able to access these tags in QGIS, but it will require a little more effort each time. So you should aim to capture any regularly used tags in the list above.+Other tags not listed will still be imported, but in a generic field called other_tags. You will still be able to access these tags in QGIS, but it will require a little more effort each time. So you should aim to capture any regularly used tags in the list above. Also note that some tags are explicitly excluded using the //ignore// field. You might find you want some of these eg ele(vation) and you should remove any such tags that you want.
  
-Take a backup of your osmconf.ini file as if you upgrade QGIS, you'll need to +If you make any changes, take a backup of your osmconf.ini file. If you upgrade QGIS, it will revert to the default, and you'll need to restore osmconf.ini if you want those fields to come through next time you process an OSM file.
  
 ====== Load data in QGIS ====== ====== Load data in QGIS ======
Line 60: Line 60:
 Select New, and locate the file. Select New, and locate the file.
  
-Once you have set up the connection, you can extract data using (for example) Vector Overlay->Extract/clip by extent. Select one of the layers within the file (points, lines, multipolygons) as the Input Layer, and an area to load.+Once you have set up the connection, you can extract data using (for example) the Processing Toolbox->Vector Overlay->Extract/clip by extent. Select one of the layers within the file (points, lines, multipolygons) as the Input Layer, and select an area to load - by map or by file. Be careful not to make it too large, or you'll get very slow performance.
  
 ====== Style data in QGIS ====== ====== Style data in QGIS ======
 +
 +Here are some sample bushwalking-based style files for OSM points and OSM lines:
 +  * {{ :osm_bw_points.qml |OSM Points}}
 +  * {{ :osm_bw_lines.qml |OSM Lines}}
 +
 +Note that they will only work fully if you have matched the tags that I'm importing.
 +
 +That said, you can generally fix any issues relating to tags by replacing a basic filtering rule such as 
 +
 +''"natural"='peak'''
 +
 +with
 +
 +''hstore_to_map(other_tags)['natural'] = 'peak'''
 +
  
 ====== Links ====== ====== Links ======
osm_qgis.txt · Last modified: 2023/12/11 09:20 by bushwalking

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki