Skip to main content
1 of 2
Nicklas Avén
  • 13.3k
  • 1
  • 41
  • 48

Sorry for not answering your question, but I would definitly do this in db-environment instead. Especially if it is a lot of data, then that will probably be a lot faster.

If you for instance load the shapefile and the dbf into a PostGIS db your query could look something like this:

CREATE TABLE new_table AS SELECT a.the_geom, a.populated_field, b.populated_field2, b.populated_field3 FROM shape_table a LEFT JOIN dbf_table b ON a.populated_field=b.populated_field1;

If you put index on the joining fields, this should be very fast. You can of course update shape_table instead, but like to create a new table instead to not destroy the original data.

Regards

Nicklas

Nicklas Avén
  • 13.3k
  • 1
  • 41
  • 48