Skip to content
Permalink
Browse files

fix TIN interpolation #40668

  • Loading branch information
vcloarec committed Dec 19, 2020
1 parent 3dfbcf5 commit b5d7abccb7e042abb5398c2a09f9dde697a3f0bc
Showing with 26 additions and 5 deletions.
  1. +26 −5 src/analysis/interpolation/qgstininterpolator.cpp
@@ -289,20 +289,41 @@ int QgsTinInterpolator::insertData( const QgsFeature &f, QgsInterpolator::ValueS

QgsPointSequence linePoints;
curve->points( linePoints );
for ( QgsPoint &point : linePoints )
for ( int i = 0; i < linePoints.size(); ++i )
{
QgsPoint &point = linePoints[i];
switch ( source )
{
case ValueAttribute:
point.setZ( attributeValue );
break;
{
QgsPoint newPoint = point;
if ( point.is3D() )
newPoint = point;
else
newPoint = QgsPoint( point.x(), point.y(), 0 );

newPoint.setZ( attributeValue );

linePoints[i] = newPoint;
}
break;

case ValueZ:
break;

case ValueM:
point.setZ( point.m() );
break;
{
QgsPoint newPoint = point;
if ( point.is3D() )
newPoint = point;
else
newPoint = QgsPoint( point.x(), point.y(), 0 );

newPoint.setZ( point.m() );

linePoints[i] = newPoint;
}
break;
}
}
mTriangulation->addLine( linePoints, type );

0 comments on commit b5d7abc

Please sign in to comment.
You can’t perform that action at this time.