Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QGIS Blueprints

You're reading from   QGIS Blueprints Develop analytical location-based web applications with QGIS

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher Packt
ISBN-13 9781785289071
Length 258 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ben Mearns Ben Mearns
Author Profile Icon Ben Mearns
Ben Mearns
Arrow right icon
View More author details
Toc

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

  4. Click on Test Connect to make sure you've entered the correct information.

  5. 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 is where we'll be...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image