I should add that if I use pgsql2shp to dump the PostGIS layer back out to a shapefile, I am able to view the features and attribute data in QGIS.
Another thing that might help. Related to encoding, when I add the PostGIS layer, it asks about encoding and I go with the default of 'system'. Is there something else that I should choose? Thanks, David. On Nov 28, 2007 10:50 PM, David Fawcett <[EMAIL PROTECTED]> wrote: > John, > > I have tried this a few different ways. > > 1. I open up a new project and add the original shapefile (epsg:26915) as > a layer and it displays the features and the attribute table is populated as > expected. > > 1a. I set the project projection to epsg:26915 and the shapefile layer > still displays. > > 1b. I add the PostGIS version of the same dataset. The srid for the > PostGIS layer is 26915. The layer shows up in the legend, but no features > appear on the map. The attribute table has the correct number of > rows/features, but no data in the table. > > 2. I open up a new project and add the PostGIS layer. It shows up in the > legend, empty rows in the attribute table. If I look at the layer > properties, the SRS appears to be correct: +proj=utm +zone=15 +ellps=GRS80 > +datum=NAD83 +units=m +no_defs > > 2a. If I set the project property of projection to epsg:26915, nothing in > the map window changes. If I refresh, nothing changes. Still no display of > the points. > > If this was purely an issue of projections, I would expect to still be > able to see the attribute information in the attribute table. > > Could this be an encoding issue? I believe that the encoding for the > PostGIS database is ASCII, not UTF. > > Also, I should note that as I was running through these test scenarios, > QGIS did crash when I saved layer properties. > > I had a friend who has an instance of PostGIS and Qgis 0.8 test the data > out for me. He took the SQL file that I had created with shp2pgsql, loaded > it into his instance of PostGIS and was able to view it in Qgis 0.8. > > Thanks again for helping me chase this down. > > David. > > > On Nov 28, 2007 4:59 PM, John C. Tull <[EMAIL PROTECTED]> wrote: > > > On Nov 28, 2007, at 1:43 PM, David Fawcett wrote: > > > > > I am running QGIS 0.9.0-1 on Mac OSX Leopard. PostgreSQL is at > > > 8.2.5-2a, PostGIS is at 1.3.1. > > > > > > I have been trying to get PostGIS layers working in QGIS. I can > > > connect to the database and see all of the tables that have geometry > > > columns. > > > > > > When I add the PostGIS layer into a QGIS project, it appears in the > > > legend and the feature type (point, poly, etc) is correctly > > > detected. No features are displayed on map. If I look at the > > > attribute table for the layer, I see the correct number of rows/ > > > features (10 for my test data). However, the rows are all blank/null. > > > > > > The layer in PostGIS has an assigned srid of 26915. If I do a query > > > on my PostGIS layer in psql to SELECT AsText(the_geom) from my test > > > layer, I get coordinate pairs that look reasonable. > > > > > > I looked through the bug list and didn't see anything that matched > > > this issue. > > > > > > I can post the shapefile or the SQL file used to create the PostGIS > > > layer if that is of use to anyone. > > > > Are you adding this postgis layer to a new map canvas, or is this a > > project that has a raster layer or other vector layer already being > > displayed? I ask because this sounds like a projection issue. I would > > guess that your project is set to WGS 84, not EPSG:26915. Can you let > > us know if you have set your projection for the project and/or enabled > > on the fly projection? > > > > John > > > >
_______________________________________________ Qgis-user mailing list [email protected] http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
