Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Sep 8, 2024
1 parent 5cd1e31 commit e1709a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions resources/function_help/json/line_interpolate_point_by_m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}, {
"arg": "use_3d_distance",
"optional": true,
"default": "false",
"description": "controls whether 2D or 3D distances between vertices should be used during interpolation (this option is only considered for lines with z values)"
}],
"examples": [{
Expand Down
1 change: 1 addition & 0 deletions resources/function_help/json/line_locate_m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}, {
"arg": "use_3d_distance",
"optional": true,
"default": "false",
"description": "controls whether 2D or 3D distances between vertices should be used during interpolation (this option is only considered for lines with z values)"
}],
"examples": [{
Expand Down
4 changes: 2 additions & 2 deletions src/core/expression/qgsexpressionfunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5655,7 +5655,7 @@ static QVariant fcnLineInterpolatePoint( const QVariantList &values, const QgsEx

static QVariant fcnLineInterpolatePointByM( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent, const QgsExpressionNodeFunction * )
{
QgsGeometry lineGeom = QgsExpressionUtils::getGeometry( values.at( 0 ), parent );
const QgsGeometry lineGeom = QgsExpressionUtils::getGeometry( values.at( 0 ), parent );
const double m = QgsExpressionUtils::getDoubleValue( values.at( 1 ), parent );
const bool use3DDistance = values.at( 2 ).toBool();

Expand Down Expand Up @@ -5761,7 +5761,7 @@ static QVariant fcnLineLocatePoint( const QVariantList &values, const QgsExpress

static QVariant fcnLineLocateM( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent, const QgsExpressionNodeFunction * )
{
QgsGeometry lineGeom = QgsExpressionUtils::getGeometry( values.at( 0 ), parent );
const QgsGeometry lineGeom = QgsExpressionUtils::getGeometry( values.at( 0 ), parent );
const double m = QgsExpressionUtils::getDoubleValue( values.at( 1 ), parent );
const bool use3DDistance = values.at( 2 ).toBool();

Expand Down

0 comments on commit e1709a3

Please sign in to comment.