[Qgis-developer] updating vector attribute tables

Martin Dobias wonder.sk at gmail.com
Sun May 18 13:34:04 EDT 2008


Hi Carson,

On Fri, May 16, 2008 at 12:15 AM, Carson Farmer <cfarmer at uvic.ca> wrote:
> Hello list,
>
> Does anyone know of a way to force a vector layer to reload it's attribute
> table? For example, say I used some outside application to update a field in
> the .dbf or a shapefile, can I get the associated vector layer in QGIS to
> reflect these changes programatically?

this has been already addressed in previous replies - for OGR sources
(including shapefiles) you would need to reopen the layer, using
PostGIS provider you'll get always fresh data.


> On a related note, is there any plans in the near future to make it possible
> to add fields to vector layer attribute tables (specifically shapefile
> attribute tables)? (I'm sure this has been asked before, but I haven't been
> able to find an answer...?)

This functionality is missing because it's missing in also in shapelib
(which is used in OGR for shapefiles). Some time ago I wanted to
implement it there, but never done it... if you have some C
programming experience, go ahead!

Martin


More information about the Qgis-developer mailing list