Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid same name for different parameters in a function
Fix duplicate "geometry" named parameters
  • Loading branch information
DelazJ authored and nyalldawson committed Aug 15, 2020
1 parent 8c9180a commit e9dd082
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions resources/function_help/json/intersects_bbox
Expand Up @@ -4,8 +4,8 @@
"groups": ["GeometryGroup"],
"description": "Tests whether a geometry's bounding box overlaps another geometry's bounding box. Returns true if the geometries spatially intersect the bounding box defined and false if they do not.",
"arguments": [
{"arg":"geometry","description":"a geometry"},
{"arg":"geometry","description":"a geometry"}
{"arg":"geometry1","description":"a geometry"},
{"arg":"geometry2","description":"a geometry"}
],
"examples": [
{ "expression":"intersects_bbox( geom_from_wkt( 'POINT(4 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )", "returns":"true"},
Expand Down
12 changes: 6 additions & 6 deletions src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -6063,9 +6063,9 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions()
fcnMakePointM, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "make_line" ), -1, fcnMakeLine, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "make_polygon" ), -1, fcnMakePolygon, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "make_triangle" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) ),
<< new QgsStaticExpressionFunction( QStringLiteral( "make_triangle" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "point1" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "point2" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "point3" ) ),
fcnMakeTriangle, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "make_circle" ), QgsExpressionFunction::ParameterList()
<< QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) )
Expand All @@ -6080,8 +6080,8 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions()
<< QgsExpressionFunction::Parameter( QStringLiteral( "segments" ), true, 36 ),
fcnMakeEllipse, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "make_regular_polygon" ), QgsExpressionFunction::ParameterList()
<< QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "center" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "radius" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "number_sides" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "circle" ), true, 0 ),
fcnMakeRegularPolygon, QStringLiteral( "GeometryGroup" ) )
Expand Down Expand Up @@ -6113,7 +6113,7 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions()
<< new QgsStaticExpressionFunction( QStringLiteral( "geom_from_gml" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "gml" ) ), fcnGeomFromGML, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>(), false, QStringList() << QStringLiteral( "geomFromGML" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "flip_coordinates" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) ), fcnFlipCoordinates, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "relate" ), -1, fcnRelate, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "intersects_bbox" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) ) << QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) ), fcnBbox, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>(), false, QStringList() << QStringLiteral( "bbox" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "intersects_bbox" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "geometry1" ) ) << QgsExpressionFunction::Parameter( QStringLiteral( "geometry2" ) ), fcnBbox, QStringLiteral( "GeometryGroup" ), QString(), false, QSet<QString>(), false, QStringList() << QStringLiteral( "bbox" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "disjoint" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "geometry1" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "geometry2" ) ),
fcnDisjoint, QStringLiteral( "GeometryGroup" ) )
Expand Down

0 comments on commit e9dd082

Please sign in to comment.