Skip to content
Permalink
Browse files
Handling MultiLineString geometry
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
  • Loading branch information
Koyaani and nyalldawson committed Aug 23, 2021
1 parent 68ab811 commit 0ad4a7d95b3cf8b7a5b2dd5501296c4b658675cc
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/expression/qgsexpressionfunction.cpp
@@ -3606,7 +3606,7 @@ static QVariant fcnSinuosity( const QVariantList &values, const QgsExpressionCon
static QVariant fcnStraightDistance2d( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent, const QgsExpressionNodeFunction * )
{
const QgsGeometry geom = QgsExpressionUtils::getGeometry( values.at( 0 ), parent );
const QgsCurve *curve = qgsgeometry_cast< const QgsCurve * >( geom.constGet() );
const QgsCurve *curve = geom.constGet() ? qgsgeometry_cast< const QgsCurve * >( geom.constGet()->simplifiedTypeRef() ) : nullptr;
if ( !curve )
{
parent->setEvalErrorString( QObject::tr( "Function `straight_distance_2d` requires a line geometry." ) );

0 comments on commit 0ad4a7d

Please sign in to comment.