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:
- Navigate to Layer | Add Layer | Add PostGIS Layers.
- Click on New.
- 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
- Name:
- Click on Test Connect to make sure you've entered the correct information.
- You may wish to save your credentials, as shown here:
Importing into PostGIS with DB Manager
Once we've added the database connection, DB Manager...