[Qgis-user] Error with the plugin contour with Qgis 1.8.0 on mountain lion
Goyo
goyodiaz at gmail.com
Mon Nov 5 10:33:07 PST 2012
2012/11/5 niandra1982 <gianluca.mastrantonio at yahoo.it>:
> Hi all
>
> I installed the plug in contour (with a lot of work) but when i try to use
> it i have this message:
> Exception struck: 24879,
>
> then it write the following
>
> Errore durante l'esecuzione di codice Python:
> (this is in italian, maybe in english is something like "errore during
> Python execution")
>
> Traceback (most recent call last):
> File "/Users/niandra/.qgis//python/plugins/contour/contour.py", line 358,
> in accept
> self.makeFilledContours()
> File "/Users/niandra/.qgis//python/plugins/contour/contour.py", line 562,
> in makeFilledContours
> polygons = self.computeFilledContours()
> File "/Users/niandra/.qgis//python/plugins/contour/contour.py", line 622,
> in computeFilledContours
> cs = plt.tricontourf(x, y, z, levels, extend=extend)
> File "/Library/Python/2.7/site-packages/matplotlib/pyplot.py", line 2683,
> in tricontourf
> ret = ax.tricontourf(*args, **kwargs)
> File "/Library/Python/2.7/site-packages/matplotlib/axes.py", line 8391, in
> tricontourf
> return mtri.tricontourf(self, *args, **kwargs)
> File "/Library/Python/2.7/site-packages/matplotlib/tri/tricontour.py",
> line 286, in tricontourf
> return TriContourSet(ax, *args, **kwargs)
> File "/Library/Python/2.7/site-packages/matplotlib/tri/tricontour.py",
> line 35, in __init__
> ContourSet.__init__(self, ax, *args, **kwargs)
> File "/Library/Python/2.7/site-packages/matplotlib/contour.py", line 703,
> in __init__
> self._process_args(*args, **kwargs)
> File "/Library/Python/2.7/site-packages/matplotlib/tri/tricontour.py",
> line 46, in _process_args
> tri, z = self._contour_args(args, kwargs)
> File "/Library/Python/2.7/site-packages/matplotlib/tri/tricontour.py",
> line 81, in _contour_args
> Triangulation.get_from_args_and_kwargs(*args, **kwargs)
> File "/Library/Python/2.7/site-packages/matplotlib/tri/triangulation.py",
> line 170, in get_from_args_and_kwargs
> triangulation = Triangulation(x, y, triangles, mask)
> File "/Library/Python/2.7/site-packages/matplotlib/tri/triangulation.py",
> line 71, in __init__
> dt = delaunay.Triangulation(self.x, self.y)
> File
> "/Library/Python/2.7/site-packages/matplotlib/delaunay/triangulate.py", line
> 121, in __init__
> self.hull = self._compute_convex_hull()
> File
> "/Library/Python/2.7/site-packages/matplotlib/delaunay/triangulate.py", line
> 158, in _compute_convex_hull
> hull.append(edges.pop(hull[-1]))
> KeyError: 24879
The triangulation algorithm fails sometimes:
http://matplotlib.org/api/mlab_api.html#matplotlib.mlab.griddata
As a workaround you can use the interpolation plugin and then extract
contour lines from the resulting raster.
Goyo
More information about the Qgis-user
mailing list