|
@@ -5692,8 +5692,13 @@ static QVariant executeGeomOverlay( const QVariantList &values, const QgsExpress |
|
|
request.setFilterExpression( filterString ); //filter cached features |
|
|
} |
|
|
|
|
|
int limit = QgsExpressionUtils::getIntValue( values.at( 3 ), parent ); //in expressions overlay functions throw the exception: Eval Error: Cannot convert '' to int |
|
|
request.setLimit( limit ); |
|
|
node = QgsExpressionUtils::getNode( values.at( 3 ), parent ); //in expressions overlay functions throw the exception: Eval Error: Cannot convert '' to int |
|
|
ENSURE_NO_EVAL_ERROR |
|
|
QString limitString = node->dump(); |
|
|
if ( limitString != "NULL" ) { |
|
|
int limit = QgsExpressionUtils::getIntValue( limitString, parent ); |
|
|
request.setLimit( limit ); |
|
|
} |
|
|
|
|
|
int neighbors = 1; |
|
|
/* |
|
@@ -6284,7 +6289,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ), |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant(), true), |
|
|
fcnGeomOverlayIntersects, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>() << QgsFeatureRequest::ALL_ATTRIBUTES, true ); |
|
|
|
|
|
// The current feature is accessed for the geometry, so this should not be cached |
|
@@ -6304,7 +6309,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ), |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant() ), |
|
|
// TODO: limit param |
|
|
fcnGeomOverlayContains, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>() << QgsFeatureRequest::ALL_ATTRIBUTES, true ); |
|
|
// The current feature is accessed for the geometry, so this should not be cached |
|
@@ -6324,7 +6329,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ), |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant() ), |
|
|
fcnGeomOverlayCrosses, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>() << QgsFeatureRequest::ALL_ATTRIBUTES, true ); |
|
|
// The current feature is accessed for the geometry, so this should not be cached |
|
|
fcnGeomOverlayCrossesFunc->setIsStatic( false ); |
|
@@ -6343,7 +6348,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ), |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant() ), |
|
|
fcnGeomOverlayEquals, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>() << QgsFeatureRequest::ALL_ATTRIBUTES, true ); |
|
|
// The current feature is accessed for the geometry, so this should not be cached |
|
|
fcnGeomOverlayEqualsFunc->setIsStatic( false ); |
|
@@ -6362,7 +6367,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ), |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant() ), |
|
|
fcnGeomOverlayTouches, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>() << QgsFeatureRequest::ALL_ATTRIBUTES, true ); |
|
|
// The current feature is accessed for the geometry, so this should not be cached |
|
|
fcnGeomOverlayTouchesFunc->setIsStatic( false ); |
|
@@ -6381,7 +6386,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ), |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant() ), |
|
|
fcnGeomOverlayDisjoint, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>() << QgsFeatureRequest::ALL_ATTRIBUTES, true ); |
|
|
// The current feature is accessed for the geometry, so this should not be cached |
|
|
fcnGeomOverlayDisjointFunc->setIsStatic( false ); |
|
@@ -6400,7 +6405,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ), |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant() ), |
|
|
fcnGeomOverlayWithin, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>() << QgsFeatureRequest::ALL_ATTRIBUTES, true ); |
|
|
// The current feature is accessed for the geometry, so this should not be cached |
|
|
fcnGeomOverlayWithinFunc->setIsStatic( false ); |
|
@@ -6419,7 +6424,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions() |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "layer" ) ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "expression" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "filter" ), true, QVariant(), true ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, -1 ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true, QVariant() ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "neighbors" ), true, 1 ) |
|
|
<< QgsExpressionFunction::Parameter( QStringLiteral( "max_distance" ), true, 0 ), |
|
|
//<< QgsExpressionFunction::Parameter( QStringLiteral( "limit" ), true ), |
|
|