[postgis-users] Viewing the PostGIS in Action examples in QGIS

Charles Sprowal uchihabarles at gmail.com
Tue Feb 12 22:50:10 PST 2013


Hello,

     I have just started reading through the book PostGIS In Action in an
attempt to learn Postgis, but have encountered a problem right at the
start. After creating a spatially enabled database, the text asks me to run
the following sql:

SELECT ST_Point(1, 2) AS MyFirstPoint;

The query ran successfully. If I understand correctly, that statement
creates a point in the db. After installing QuantumGIS and accessing the
database through it, I expected to be able to view the point, but I could
not. I had a similar problem with another query in the same chapter that's
supposed to generate a heart-shaped polygon:

SELECT ST_GeomFromText('LINESTRING(52 218, 139 82, 262 207, 245 261, 207
267,
153 207, 125 235, 90 270, 55 244, 51 219, 52 218)') AS HeartLine;

When I connect to the database through QGIS, I get the following log
message: "Database connection was successful, but the accessible tables
could not be determined." The only table that is listed as having geometry
(table "raster_columns" under schema "public") does not seem to contain the
point. I cannot even select the table to add a layer from it.

I've followed the instructions in chapter 12.3 for QGIS use and remain at a
loss. Any idea where I'm going wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130213/bfd6fb45/attachment.html>


More information about the postgis-users mailing list