BlueSpray is a java-based GIS application and is available at the SchoonerTurtles web site. For this exercise, you'll want to use the latest alpha release. BlueSpray allows just about any SQL query to be executed against a database making it more flexible than QGIS.
In the dialog that appears, change the "Host", "Username", and "Password" as needed. You will only need to change the "Port" if you installed PostgreSQL on a different port than 5432. Click "Update Databases Below" to update the list of databases from the database server.
Settings to load data from the "natural_earth2" database included with OSGeoLive.
Next, click on the "Query" table and select "Regions" as the "Layer Type" to load geometries from the database. Then, you can either select an entire table to load from the datbase or enter a PostgreSQL query into the box provided. My advice is to create queries in the PostgreSQL query editor, make sure the work, and then paste them into the "Query" box. Clicking "Update Field Names" will then allow you to select the column that contains the "Shapes" (geometries). You can select an "ID Column" if you which to edit and update the data.
Clicking OK with the settings above will provide the countries as shown in the image below.
We can also execute more complex queries such as the one below which will load any country whose name includes "united".
Note that BlueSpray currently needs to have the geometry field returned as text ("ST_AsText(geom)") and a "*" for the SELECT will not return spatial data.
© Copyright 2018 HSU - All rights reserved.