[Qgis-user] Question on PostGIS Table and QGIS
Randal Hale
rjhale at northrivergeographic.com
Mon Jun 8 08:06:23 PDT 2015
I've had one other suggestion - I'll add this to the list and see what
happens. Luckily this isn't vital at the moment - so I have some time to
play a bit and see what I can do better.
On 06/08/2015 11:03 AM, Jeff McKenna wrote:
> On 2015-06-07 11:50 AM, Randal Hale wrote:
>> I'm breaking new ground and I'm pretty sure this might be a mistake on
>> my end. I just need to understand why.
>>
>> I've set up a PostGIS database. I'm importing data through DB manager
>> into my schema.
>>
>> I imported some parcel records and discovered that I had multipolygons.
>> So I decided to break them up into single polygons through the psql
>> interface:
>> create table trgtgis.parcels as select *, (st_dump(geom)).geom as
>> the_geom from trgtgis.boundary;
>>
>> When I go back to QGIS I have two tables called parcels (only one listed
>> if I look through postgresql). One table is what I suspect to see with
>> column called the_geom, data Type as Geometry, Spatial type of Polygon,
>> SRID of 26916. The second parcel table is greyed out and doesn't have a
>> spatial type or a SRID. Neither lists a primary key (I need to go back
>> and add one) but I don't think this is the problem...I think.
>>
>> Screenshot:
>> https://drive.google.com/file/d/0B8WLtz606XDdcFIxaG5fNExpMlU/view?usp=sharing
>>
>>
>>
>
> Hi Randy,
>
> I've seen this issue before (QGIS listing multiple layers for one
> PostGIS table), but I did solve it, I just can't remember how I did
> that ha :)
>
> I believe one of my issues was that QGIS (and MapServer in fact) need
> a unique ID field, to display the data from PostGIS, so I always make
> sure to specify a unique ID field when creating tables for use in both
> QGIS and MapServer.
>
> -jeff
>
>
>
>
>
--
-----------------
Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjhale at northrivergeographic.com
twitter:rjhale http://about.me/rjhale
http://www.northrivergeographic.com/introduction-to-quantum-gis
Southeast OSGEO: http://wiki.osgeo.org/wiki/Southeast_US
More information about the Qgis-user
mailing list