[GIS] Merging polygon and line shapefiles into one using QGIS

mergeqgis

I have two shapefiles: One is a line feature of the rivers and waterways of London, the other is a polygon feature of the reservoirs, lakes and ponds of the same area.

Is it possible please to merge these two different shapefiles into one using QGIS?

Best Answer

According to the shapefile specification (page 4):

All the non-Null shapes in a shapefile are required to be of the same shape type. The values for shape type are as follows:

Value Shape Type
0 Null Shape 
1 Point 
3 PolyLine 
5 Polygon 
8 MultiPoint 
11 PointZ 
13 PolyLineZ 
15 PolygonZ 
18 MultiPointZ 
21 PointM 
23 PolyLineM 
25 PolygonM 
28 MultiPointM

This means that either all the shapes in the shapefile are polygon (5,15 or 25) or polyline (3, 13 or 23), in order to merge these you can either Convert the polygons in the reservoirs to lines, convert the lines to polygons or buffer the lines to make polygons. When they are the same geometry type then you can merge the shapefiles.