I'm writing a plugin in QGIS and I'd like to generate a TIN surface using a vector layer with x,y and z (interpolation attribute).

The idea is to visualize the same result like in the Interpolation plugin but optimize it in my plugin, to facilitate users.

Does such a function exist?

Can I communicate with the Interpolation plugin to generate the result?

Thank you very much!

Ciao Steffy


see Is there are QGIS plugin to allow the 3d visualisation of geological borehole data similar to the functionality of Target for ArcGIS? for my solution in Python with the modules Matplotlib and Visvis

The Interpolation plugin generates surfaces in ArcInfo ASCII grid format (. asc) but it offers no way to visualize the results in 3D or to process the 3d shapefiles (PointZ,..)

I presented a solution and the scripts in the QGIS-Developer list visualizing 3D data (Z values) or data with z attribute: a solution and, in French, in QGIS, représentation 3D des couches vectorielles (shapefiles dits 3D ou shapefiles avec attributs z) avec les modules Python Matplotlib ou Visvis à partir de la console Python or in Spanish in QGIS, visualización 3D de capas vectoriales con Python

3d visualisation of the points (Visvis)


a resulting 3d grid (here with matplolib function griddata but you can use all the interpolation algorithms of Scipy or others modules)


The shaded surface with an elevation colormap (Visvis)


3d contour lines (Matplotlib) enter image description here

and for fun ...(Visvis)

enter image description here

But build a plugin seems a priori to me very complex and time consuming:

  • plot 3 d points is easy.
  • but in all other cases, all the scenarios (3D shapefile points, lines or polygons, shapefile with z attribute, interpolation algorithm, ...) should be considered before.
  • You need Python modules that are not present by default in QGIS (like Shapely, Scipy or Visvis)
  • very nice! I tought of coding a plugin for 3d-visualization before and your code examples are quite good. Why not implement it in a little button for the qgis-toolbar. Additional python modules can easily be installed (tinyurl.com/bvcmp9l)
    – Curlew
    Dec 23 '12 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.