O'Reilly logo

QGIS Blueprints by Ben Mearns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Database importing and topological relationships

Now that we've prepared the OSM data, we need to actually load it into the database. Here, we can generate the topological relationships based on geographic relationships as determined by PostGIS.

Connecting to the database

Although we will be working from the Database Manager when dealing with the database in QGIS, we will first need to connect to the database through the normal "Add Layer" dialog. Perform the following steps:

  1. Navigate to Layer | Add Layer | Add PostGIS Layers.
  2. Click on New.
  3. In the Create a New PostGIS connection dialog, enter the following parameters, accepting others as their defaults:
    • Name: packt_c4
    • Host: localhost
    • Database: packt_c4
    • Username/password: As configured earlier in this chapter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required