-
Book Overview & Buying
-
Table Of Contents
QGIS By Example
By :
Now that we have loaded all of the available data into QGIS, let's aggregate it into a single database. QGIS supports working with various database management systems and their spatial extensions (PostgreSQL/PostGIS, Oracle Spatial/GeoRaster, MSSQL Spatial, SQL Anywhere, and SQLite/SpatiaLite). Among them, PostGIS and SpatiaLite are the ones you have probably already heard about. Being common, these spatial databases are usually used for different purposes. PostGIS is an example of an enterprise solution used mostly on a server to provide spatial data maintenance and access for multiple users. SpatiaLite is a lightweight file database for personal use. Usage of SpatiaLite database has a number of advantages as follows:
.shp, .dbf, .shx, .prj, .qpj, and so on)Perform the following steps to assemble your data into a single SpatiaLite database:
.sqlite database file name. You will get the The database has been created message. Now you can expand the entry and see your newly created empty database.
, or access it from the Table menu.

ny_boroughs, the same as the input).
The following options allow you to exercise more control over your data:
pk by defaultgeom by defaultAfter hitting OK and waiting a little (depending on the file size, the process may take some time), you will get the Import was successful message. To explore the imported table click on the Refresh button
, and you will see a geometry table in the list of database items. From the Info tab, you can view information about table, geometry type, fields, and triggers. The Table tab displays data in a tabular form, and the Preview tab displays spatial geometry, if any. By right-clicking on any element, you can delete, rename, or add it to the map canvas. All other opened layers can be loaded in a similar way.

Aside from the core functionality, there is an external plugin called QSpatiaLite that is specially designed to support work with SpatiaLite databases. After installation, it will be available when you navigate to Database | SpatiaLite | QSpatiaLite.
Change the font size
Change margin width
Change background colour