[Qgis-us-user] DBF table for SHP geo file

karsten karsten at terragis.net
Tue Dec 29 12:40:14 PST 2020

Hi Javier,
> >>  I was provide an application in ArcInfo SHP format and the data
appears to be stored in a DBF file (Dbase) 
Yes it is in dbf format .
 >>> The first column in the table is a field OBJECTID which I believe might
hold the line geometric information 
Nope. The geometry is in the *.shp file , while the *.shx is the index that
connects the. Thus, editing the *.dbf does not touch the geometries . So one
'shape* is a file is in fact (at a minimum)  the three files - the *.shp, a
*.dbf and the *.shx file...
 >>>  I created a subset of the map, Test.DBF, with just a few columns
including the OBJECTID column and a columns called "merged" that I need to
edit from an external application 
That could work if you actually used a selection in QGIS to do this and have
the saved that selected trifecta of the files  Test.shp, Test.dbf and
Test.shx . If you only created  test.dbf instead that will not work. In that
case recreate a new subset with those 3 files mentioned above (cerate
selection then save layer (only selected) to a new shape file)
 >>>  I ATTACH the Test.dfb table using an external database (R:Base) and I
can see the column data just fine, the "merged" column show all values as
When I change the value of "merged" from NULL to "Y" either via a grid or
command, it changes it correctly but also changes the value of OBJECTID to
NULL. When I open the map in QGIS and enable the layer "Test", the lines
still display but now the column OBJECT ID shows as NULL.  >>>
I am not exactly sure how you are doing that in detail but in QGIS one can
not usually edit joined data from another source (like other dbf files join
on an id field, or joined xls(x) Excel files or csv data that where joined.
The way to do it is to either 
1.) edit the data outside QGIS and then join that table to the shape file it
in QGIS (use the join tab) , or 
2.) join the data in QGIS and then save the entire dataset (with those
joined data) to a new shape file. If going that second route one can then
edit the data easily inside QGIS. One good way to edit the data in QGIS is
also using the field calculator - see here e.g.
_table.html?highlight=calculator#using-the-field-calculator . 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-us-user/attachments/20201229/9cb1b2c6/attachment-0001.html>

More information about the Qgis-us-user mailing list