Extract OSM MAp to QGIS

  • 3.)Import the map.osm file into QGIS.
    • i.) In QGIS, open a new file. Go to Vector -> OpenstreetMap -> Import Topology from XML
    • ii.) In the dialog box specify the map.osm file and create a .db file

  • 4.)Export the OpenStreetMap topology to SpatialLite.
    • i.) Go to Vector -> OpenstreetMap -> Export Topology to SpatialLite
    • ii.) In the dialog box, specify .db file created in (3).
    • iii.) Specify the export type. For each type repeat steps 4.iv - 4.v.
    • iv.) Specify the output layer name.
    • v.) Click on "Load from DB" and click "Select All" so that QGIS imports all attributes from the osm file.
    • vi.) There will be 3 layers of information on the layers panel. Once you have repeated 4iii - 4v for all the different types: points, polylines and polygons. Points are the point of interest on a map, such as bus stops, subway stations. Polylines are the transportation network, which includes roads and railway lines. Polygons are the building footprints.

  • 5.)Next we obtain the boundary definition of the punggol area. Go to data.gov.sg. Search for “Master Plan 2014 Planning Area Boundary (No Sea)”. Download the "Master Plan 2014 Planning Area Boundary (No Sea) (KML)" data. The data defines the new town boundaries. Extract "MP14_PLNG_AREA_NO_SEA_PL.kml" from "the master-plan-2014-planning-area-boundary-no-sea.zip".

  • 6.)Import "MP14_PLNG_AREA_NO_SEA_PL.kml" into QGIS.
    • i.) Click on the "Add Vector Layer" icon.
    • ii.) In the dialog box specify the "MP14_PLNG_AREA_NO_SEA_PL.kml" file and import it.

  • 7.)We need the Punggol area. Isolate and save the Punggol boundary area as a shapefile.
    • i.) Select the "MP14_PLNG_AREA_NO_SEA_PL" layer.
    • ii.) Click on the "Select Features by area or single click".
    • iii.) Select the Punggol area on the map.
    • iv.) Right click on the "MP14_PLNG_AREA_NO_SEA_PL" layer and select "Save As..."
    • v.) Tick the "Save only selected features". In the dialog box, specify where to save the Punggol shapefile. Create an empty folder to house the shapefiles, QGIS creates 5 files (.shp, .dbf, .prj, .qpj, .shx). QGIS creates the isolated Punggol shapefiles. Right click on the "MP14_PLNG_AREA_NO_SEA_PL" layer and select remove.

  • 8.)Clip the OSM layers with the Punggol boundary layer. By doing so, only Punggol information will remain on the map canvas.
    • i.) Go to Vector -> Geoprocessing Tools -> Clip ...
    • ii.) In the dialog box, specify the map_polygons layer as the input layer and Punggol boundary as the clip layer. Specify the name and file path for clipped layer. Repeat this for all the other OSM layers. After the operation one should get the map as shown in the figure below. Remove all the unclipped layers.

  • 9.)Filter the information through excluding and including certain attributes.
    • i.) Right click on the punggol_polygons layer -> Filter ...
    • ii.) In the "Provider specific filter expression" dialog box, specify "building is not NULL" expression. The expression means filter away all polygons which their building field is equal to NULL.

  • 10.)Repeat 9i & 9ii for Punggol_points. Specify the expressions: highway = ‘bus_stop’ OR railway = ‘station’. Points which their highway field is not equal to bus_stop or railway field is not equal to station are filtered away.

  • 11.)We have the map with the relevant information.Right Click on the layer -> Save As... Save these layers as:
  • i.) in the dialog box change the CRS: Selected CRS (EPSG:3414, SVY21/ Singapore TM)
  • punggol_polygons->punggol_buildings.
  • punggol_points->punggol_stations_stops.
  • punggol_polylines->punggol_trpst_network.
  • Remove the punggol_polygons, punggol_points and punggol_polylines layers.

results matching ""

    No results matching ""