- Download data
- Import topology from XML
- Export topology to SpatiaLite
The following steps illustrate how to import OpenStreetMap features into QGIS.
Download data
- Start QGIS. Optional: Navigate the map view to the area where you want to download OpenStreetMap features.
- Select Vector | OpenStreetMap | Download data.
The Download OpenStreetMap data dialog box appears. - Optional. Choose an extent method e.g. From map canvas.
- In the Output file field, click the [...] button.
The Save As dialog box appears. - Type in a file name, e.g. fortaleza.osm. Click Save. Click OK.
The OpenStreetMap data has been downloaded. - Click OK. Click Close.
Import topology from XML
- Select Vector | OpenStreetMap | Import topology from XML.
The OpenStreetMap Import dialog box appears. - In the Input XML file (*.osm) field, click the [...] button.
The Open dialog box appears. - Browse and select the previously downloaded *.osm file, e.g. fortaleza.osm. Click Open.
The Output SpatiaLite DB file and Connection name fields are populated with default values. - Click OK.
The OpenStreetMap tables are imported into the SpatiaLite DB. - Click OK. Click Close.
Export topology to SpatiaLite.
- Select Vector | OpenStreetMap | Export topology to SpatiaLite.
The Export OpenStreetMap topology to SpatiaLite dialog box appears. - In the Input DB file field, click the [...] button.
The Open dialog box appears. - Browse and select the previously created SpatiaLite DB file, e.g. fortaleza.osm.db. Click Open.
- In the Export type field, toggle on a geometry feature type, e.g. Polylines.
- Optional. In the Output layer name field, type in a layer name to use, e.g. fortaleza_polylines.
- Click OK.
The layer is created in QGIS. - Click OK.
- Optional. Repeat the previous steps 4-6 for additional geometry types.
- Click Close.
No comments:
Post a Comment