Bug report #14513
Bad Interpolation TIN (displacement and hole) when too many points inside pixel...
|Affected QGIS version:||2.99(master)||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||22486|
I have got my problem with QGIS 2.12.x, 2.14.x, and QGIS 2.15.0 Master (installation OSGeo4W64) under Windows 64 bits...
The interpolation TIN with QGIS only (Menu Raster > Interpolation > Interpolation, and select a shapefile with points for the Interpolation TIN) ...
To compare: the same shapefile with QGIS and : Processing > SAGA > Grid-Gridding > Triangulation ...
To help to understand my problem, i join 3 pics (3 jpeg) and my data (in a archive .zip)
Thanks for all.
#1 Updated by Maximilian Krambach over 6 years ago
- File interpolation.jpg added
When trying with evenly distributed OSM data, I (debian testing, qgis 2.14) get a triangle of data (see interpolation.jpg). It is not a case of "too many points per pixel", as it only searches in the center of the pixel.
The creation of triangles for the TIN (as seen in "export triangles for the triangulation") seems correct.
I think the source is hidden somewhere in "DualEdgeTriangulation::getTriangle"
which returns false in cases of "too many triangles around".
My way there is something like that:;
interpolation/QgsTINInterpolator.cpp: 47: interpolatePoint -->
interpolation/LinTriangleInterpolator.cc : 101: CalcPoint-->
interpolation/dualedgetriangulation.cc: 1082: getTriangle -->
(maybe: interpolation/dualedgetriangulation.cc: 477: baseEdgeOfTriangle)
I don't fully understand the last two functions.
#2 Updated by Maximilian Krambach over 6 years ago
I tested it in debug mode. For many points, function DualEdgeTriangulation::baseEdgeOfTriangle (477) is entering an endless loop, which is stopped after 300000 runs with an error code, which is then passed down to other functions; those fail because the triangle searched is "-100"
#3 Updated by Maximilian Krambach over 6 years ago
In DualEdgeTriangulation:pointVectorCount there is only one definition of mEdgeInside = 3, if mPointVector.count() == 2 (182).
The other options (mPointVector.count() 1,3, >3) miss the appropiate mEdgeInside values, which seem to be different, something between 0 and 5.
This value tells baseEdgeofTriangle (477) on which given edge to start searching. Setting it (479) to 3 results in misses, setting it to 2 results in different misses. 1 or 0 result in QGIS crashing because of index error.
So I guess the value has to be updated according to pointVectorCount for all cases.
#5 Updated by Olivier ATHIMON about 6 years ago
- Assignee set to Even Rouault
The problem of TIN Interpolation always exists in QGIS LTR 2.14.7, QGIS 2.16.3 and QGIS 2.17...
Any solution Maximilian Krambach?...
Maybe, a solution with the interpolation with library gdal??? I request Mister Even Rouault?...
#10 Updated by Olivier ATHIMON almost 5 years ago
I have tried the same interpolation TIN with QGIS 3 (exactly QGIS 2.99, QGIS b6ad920404)...
I join the result (Result_Bad_interpolation.jpg) and my parameters (Parameters.jpg) for the tool :
Processing > QGIS > Interpolation > Interpolation TIN
2009_06_bathy_L93_NGFN.zip (joined in my first message)...
#12 Updated by Giovanni Manghi over 3 years ago
- Status changed from Open to Closed
- Resolution set to end of life
End of life notice: QGIS 2.18 LTR