Skip to content
Permalink
Browse files

Check if a point is a measure before returning its m value.

  • Loading branch information
pblottiere committed Sep 28, 2020
1 parent ba33c3a commit 829ee25d431b2b3d1ea08fa8a930bb519ab2dd2f
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/expression/qgsexpressionfunction.cpp
@@ -2380,6 +2380,9 @@ static QVariant fcnGeomM( const QVariantList &values, const QgsExpressionContext
if ( geom.isNull() )
return QVariant(); //or 0?

if ( !geom.constGet()->isMeasure() )
return QVariant();

//if single point, return the point's m value
if ( geom.type() == QgsWkbTypes::PointGeometry && !geom.isMultipart() )
{

0 comments on commit 829ee25

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