Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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)
share|improve this answer
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 ( – Curlew Dec 23 '12 at 12:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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