Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I load two unique layers, wherein each layer contains unique data, but both layers share the exact same schema, why is it when I copy a feature from layer 1, and paste it into layer 2, the attributes to not transfer exactly as they should?

What happens is when pasting a feature from layer 1 into layer 2, the layer 2 attributes of said feature has the data offset by 2 columns, e.g.-

layer 1 schema

layer 2 schema

A record from layer 1 like this:

clave; 666
name; JOE BLOW
address; 123 ANYSTREET
tel: 867-5309

Transfers to layer 2 like this:

address; 666
email; 123 ANYSTREET

So, the actual data is being offset by two columns, and the two columns that are passed over, the data from those columns does not show up anywhere. Clearly, this is not the way it should be behaving, perhaps others have had the same problem?


Eric Jarvies

share|improve this question
I would further add that this applies to 1.7+ versions, as does it apply to the latest 1.9.x development versions(I am on OS X), and this problem occurs with either shapefiles or postgresql/postgis table layers added to the QGIS map stack using the normal LAYER > ADD * LAYER menu item. – Eric jarvies Apr 20 '12 at 18:11
When I have a PostgreSQL/PostGIS table/layer opened(layer 1), and a local shapefile layer opened(layer 2), wherein both layers have the same schema as described above, if I copy a feature from the shapefile layer(layer 1) over to the PostgreSQL/PostGIS layer(layer 2), then the column offset problem occurs. It seems the gid and the_geom columns in layer 2 are what are causing the offset problem. – Eric jarvies Apr 20 '12 at 19:22
Should not QGIS be taking these two columns into account, because when you export a table(e.g.- pgsql2shp) to a shapefile, the gid and the_geom column do not export in tabular attribute column form. If one creates both the gid and the_geom columns in the shapefile layer(layer 2) as a means of 'matching' both layer 2 with layer 1, so the tabular attribute columns are the same, this of course will not solve the problem. Instead, the QGIS app itself needs to address this problem, right? – Eric jarvies Apr 20 '12 at 19:44
Eric, on 1.7.4 on Mac OS X 10.6.8, I do not see this issue when copying features from shapefile to shapefile. Could you not load your 'copy-from' shapefile into PostgreSQL first, then copy-paste table to table? – dakcarto Apr 23 '12 at 21:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.