[GIS] How to edit shapefile attribute tables so they all have the same information

attribute-tablemergeqgisshapefile

I am trying to merge several pipeline shapefiles using GEOMERGE but it cannot complete the function because they have different column definitions.

So I need to edit the attribute tables so that they all have the same data/layout.

For e.g one pipeline has the following columns in the attribute table: ID REF TYPE

and in another pipeline attribute table it has: Leg-No From To Length_Km

What is the best way for me to overcome this?

If it is relevant some of the shapefiles have been converted from KML to shapefiles using GQIS.

Best Answer

You can use Table Manager Plugin in QGIS to rename, delete and sort table attributes. You can try harmonize the shapefiles structure.

There is one limitation, Table manager won't be able to change attribute types. If you have an attribute that is a "text" in one shapefile and a "integer" in the other, you have to create a temporary attribute and convert the data to it.

Another alternative, for points or polylines "merge", is to use union instead of merge. the result is a shapefile with all the fields of both input shapefiles. Obviously the attributes from shape2 will be empty in the shape1 attributes, but using table attribute calculator you can solve that.

Related Question