2

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?

1 Answer 1

1

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)

points

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

grid

The shaded surface with an elevation colormap (Visvis)

surfaces

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)
0

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