Trying the v.clean command and checked the layer with Topology checker and it turned out every single geometry was invalid.
What to do now?
Original question:
I have two shapefiles with 3D building blocks that I want to merge (Both MultiPolygonZ-type, the same columns in attribute table with the same projection). The blocks represent houses in two different area of the city (no overlaps).
Vector > Data Management Tools > Merge vector layers works great except that some features in the merged file looses it's solidness, see example below:
Houses from one of the shapes before merge (all houses are solid):
The same canvas from the merged file (some features loose their solidness):
Has anyone experienced the same problem and been able to workaround it?
Links below to two of the shape-files I'm trying to merge if anyone want to try and re-create the problem:
Dataset A: https://drive.google.com/open?id=0BwFHJFrNX33hbGFHS2ZCeUVJNWc
Dataset B: https://drive.google.com/open?id=0BwFHJFrNX33hZGFoT2xiVXZSbGs
Best Answer
I had the same issue dossolving polygons, the problem was that there were Geometry Errors. Bare in mind my process was a Standalone application, however the concept should help. Before performing the merge I ran
This tool is simply a GRASS tool called v.clean, you can search for it from your processing toolbox. This tool cleans the geometry of the input vector layer, read about this more HERE
If you don't trust the v.clean to solv the problems, You can also use the Check Geometry Validity from fTools plugin, to inspect the file manually, this tool will highlight all geometry errors, enter edit mode to solve the errors by deleting duplicate Nodes, Polygon overlaps etc.
Once the Geometry errors are dealt with the files should merge, dissolve, intersect, without losing features.
Another method I used was the GDAL tools ogr2ogr
read more here
*Note you need the OSGeo4W shell provided with the For Advanced Users Download * This should help defeat the geometry errors Hopefully this solves your issue, I remember how frustrating it was with me.