Skip to content
Permalink
Browse files
Fix parameter names for affine expression function
Convention in qgis is underscore_name for expression function
names/parameter names
  • Loading branch information
nyalldawson committed Oct 14, 2021
1 parent e1b0985 commit 02003274bb1b057604633ab8045b2cb253f07e62
Showing with 18 additions and 18 deletions.
  1. +9 −9 resources/function_help/json/affine_transform
  2. +9 −9 src/core/expression/qgsexpressionfunction.cpp
@@ -5,15 +5,15 @@
"description": "Returns the geometry after an affine transformation. Calculations are in the Spatial Reference System of this geometry. The operations are performed in a scale, rotation, translation order. If there is a Z or M offset but the coordinate is not present in the geometry, it will be added.",
"arguments": [
{"arg":"geometry","description":"a geometry"},
{"arg":"deltaX","description":"x-axis translation"},
{"arg":"deltaY","description":"y-axis translation"},
{"arg":"rotationZ","description":"rotation around z-axis in degrees counter-clockwise"},
{"arg":"scaleX","description":"x-axis scale factor"},
{"arg":"scaleY","description":"y-axis scale factor"},
{"arg":"deltaZ","optional":true,"default":"0","description":"z-axis translation"},
{"arg":"deltaM","optional":true,"default":"0","description":"m-axis translation"},
{"arg":"scaleZ","optional":true,"default":"1","description":"z-axis scale factor"},
{"arg":"scaleM","optional":true,"default":"1","description":"m-axis scale factor"}
{"arg":"delta_x","description":"x-axis translation"},
{"arg":"delta_y","description":"y-axis translation"},
{"arg":"rotation_z","description":"rotation around z-axis in degrees counter-clockwise"},
{"arg":"scale_x","description":"x-axis scale factor"},
{"arg":"scale_y","description":"y-axis scale factor"},
{"arg":"delta_z","optional":true,"default":"0","description":"z-axis translation"},
{"arg":"delta_m","optional":true,"default":"0","description":"m-axis translation"},
{"arg":"scale_z","optional":true,"default":"1","description":"z-axis scale factor"},
{"arg":"scale_m","optional":true,"default":"1","description":"m-axis scale factor"}
],
"examples": [
{ "expression":"geom_to_wkt(affine_transform(geom_from_wkt('LINESTRING(1 1, 2 2)'), 2, 2, 0, 1, 1))", "returns":"'LineString (3 3, 4 4)'"},
@@ -7024,15 +7024,15 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions()
<< QgsExpressionFunction::Parameter( QStringLiteral( "center" ), true ),
fcnRotate, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "affine_transform" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "deltaX" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "deltaY" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "rotationZ" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scaleX" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scaleY" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "deltaZ" ), true, 0 )
<< QgsExpressionFunction::Parameter( QStringLiteral( "deltaM" ), true, 0 )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scaleZ" ), true, 1 )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scaleM" ), true, 1 ),
<< QgsExpressionFunction::Parameter( QStringLiteral( "delta_x" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "delta_y" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "rotation_z" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scale_x" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scale_y" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "delta_z" ), true, 0 )
<< QgsExpressionFunction::Parameter( QStringLiteral( "delta_m" ), true, 0 )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scale_z" ), true, 1 )
<< QgsExpressionFunction::Parameter( QStringLiteral( "scale_m" ), true, 1 ),
fcnAffineTransform, QStringLiteral( "GeometryGroup" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "buffer" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "geometry" ) )
<< QgsExpressionFunction::Parameter( QStringLiteral( "distance" ) )

0 comments on commit 0200327

Please sign in to comment.