[GIS] Interpolation plugin error message WKB access out of bounds with QGIS 2.14 & 2.18

interpolationqgis

I am new to QGIS.

I am trying to construct a DEM from contour lines by using QGIS 2.14.0. (and later 2.18) I am doing this by using a clip rectangle tool (geoprocessing tools) on top of the contour lines and interpolating, by using the interpolation plugin, using triangular interpolation.

After I enter the data in the interpolation dialog and clic Save I get an
exception "WKB access out of bounds".

Someone suggested that to avoid getting this error, it's better to interpolate before clipping the image, but doing this causes QGIS to doing a massive processing taking a huge amount of time.

Has anyone run into this and managed to find a solution?

Best Answer

I could escape this error by cleaning the clipped contour lines before interpolation.

To clean the contour, I used Processing | GRASS | Vector | v.clean tool.

enter image description here

The attached image shows chdangle I often use, but it seems any of these cleaning tools works (at least break, snap, rmdangle, and chdangle as far as I know.)