Visualising The Data with QGIS Desktop - SpotScore/spotscore GitHub Wiki

How to load PostGIS data to QGIS layers

  1. Download and install QGIS
  2. Run your PostgreSQL/PostGIS database (container) where you loaded data with osm2pgsql.
  3. Open QGIS and in the menus go to "Layer" > "Add Layer" > "Add PostGIS Layers" or press (Ctrl + Shift + D).
  4. In the dialog window click button "New".
  5. Fill in the database connection information:
  • Name: Spotscore OSM (or anything you like)
  • Host: localhost
  • Port: 5432
  • Database: gis
  • Username: spotscore
  • Password: notsecret
  • make check in "Save Username"
  • make check in "Save Password"
  • make check in "Only look in the 'public' schema".
  1. Now press "OK" and the connection appears in the "Connections" dropdown.
  2. Press "Connect" with the "Spotscore OSM" selected. List is filled with public schema tables that contain a 'way' geometry column.
  3. Select the following tables with your mouse cursor left click so they are highlighted:
  • planet_osm_line
  • planet_osm_point
  • planet_osm_polygon
  1. Press the button "Add".
  2. Now the added layers are listed in the "Layers" panel.

For further documentation please read the official QGIS User Guide.

Additional tools

  • A useful plug-in for visualizing SQL query results is the "DB Manager". You can install it through the menu "Plugins" > "Manage and Install Plugins...".