I have a Postgis table that I open with QGis. My problem is related to feature Ids: they are not the same so, for example, feature with id 123 in the database is not the same geometry 123 that I can reach in QGis "Attribute Table". It seems that QGis reindex table features. Is there a way to avoid this or to reorder QGis indexes?
|
closed as too localized by underdark♦ Aug 1 '12 at 16:13
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.
|
I discovered that querying the loaded data using "Query..." window, I get the correct features. For example, if in this window I put in "SQL where clause" field the string "id IN (12700, 11250,11824)", I get visualized the corresponding features that have those ids in Postgis database. But in "Attribute Table", these ids does not match, probably because QGis re-organizes these table with its own ids, as guessed. In other words: problem solved, I can retrieve features using database ids through QGis. |
|||||||||||
|
|
I think your Postgis database is missing a primary key. I have filled my database with OpenStreetMap data, and the column "osm_id" (which serves as primary key) is automatically added to the attribute table in Quantum GIS. The row number in pgAdmin is something completely different, depending on sorting etc. |
|||
|

