-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alias support for expression functions
Standardise naming of all internal functions to lowercase with underscore convention. Add aliases for old names to avoid breakage.
- Loading branch information
1 parent
bb64830
commit bd9e02b
Showing
29 changed files
with
198 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
resources/function_help/convexHull → resources/function_help/convex_hull
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<h3>convexHull function</h3> | ||
<h3>convex_hull function</h3> | ||
Returns the convex hull of a geometry. It represents the minimum convex geometry that encloses all geometries within the set. | ||
|
||
<h4>Syntax</h4> | ||
<pre>convexHull( a, b )</pre> | ||
<pre>convex_hull( a, b )</pre> | ||
|
||
<h4>Arguments</h4> | ||
a → geometry | ||
a → geometry | ||
|
||
<h4>Example</h4> | ||
<pre> geomToWKT( convexHull( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 4 10)' )) ) → returns POLYGON((3 3,4 10,4 4,3 3)) </pre> | ||
<pre> geom_to_wkt( convex_hull( geom_from_wkt( 'LINESTRING(3 3 , 4 4 , 4 10)' )) ) → returns POLYGON((3 3,4 10,4 4,3 3)) </pre> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h3>geom_from_gml function</h3> | ||
Returns a geometry from a GML representation of geometry | ||
|
||
<h4>Syntax</h4> | ||
<pre>geom_from_gml(text)</pre> | ||
|
||
<h4>Arguments</h4> | ||
text → GML representation of a geometry | ||
|
||
<h4>Example</h4> | ||
<pre> geom_from_gml( '<gml:LineString srsName="EPSG:4326"><gml:coordinates>4,4 5,5 6,6</gml:coordinates></gml:LineString>') → returns a geometry</pre> | ||
|
6 changes: 3 additions & 3 deletions
6
resources/function_help/geomFromWKT → resources/function_help/geom_from_wkt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<h3>geomFromWKT function</h3> | ||
<h3>geom_from_wkt function</h3> | ||
Returns a geometry created from a Well-Known Text (WKT) representation. | ||
|
||
<h4>Syntax</h4> | ||
<pre>geomFromWKT(text)</pre> | ||
<pre>geom_from_wkt(text)</pre> | ||
|
||
<h4>Arguments</h4> | ||
text → Well-Known Text (WKT) representation of a geometry | ||
|
||
<h4>Example</h4> | ||
<pre> geomFromWKT( 'POINT(4 5)' ) → returns a geometry</pre> | ||
<pre> geom_from_wkt( 'POINT(4 5)' ) → returns a geometry</pre> | ||
|
6 changes: 3 additions & 3 deletions
6
resources/function_help/geomToWKT → resources/function_help/geom_to_wkt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<h3>geomToWKT function</h3> | ||
<h3>geom_to_wkt function</h3> | ||
Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata. | ||
|
||
<h4>Syntax</h4> | ||
<pre>geomToWKT(a)</pre> | ||
<pre>geom_to_wkt(a)</pre> | ||
|
||
<h4>Arguments</h4> | ||
a → geometry | ||
|
||
<h4>Example</h4> | ||
<pre> geomToWKT( $geometry ) → POINT(6 50)</pre> | ||
<pre> geom_to_wkt( $geometry ) → POINT(6 50)</pre> |
4 changes: 2 additions & 2 deletions
4
resources/function_help/getFeature → resources/function_help/get_feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<h3>getFeature function</h3> | ||
<h3>get_feature function</h3> | ||
Returns the first feature of a layer matching a given attribute value | ||
|
||
<h4>Syntax</h4> | ||
<pre>getFeature( layer, attributeField, value )</pre> | ||
<pre>get_feature( layer, attributeField, value )</pre> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<h3>intersects_bbox function</h3> | ||
Returns 1 if the geometries spatially intersect the bounding box defined and 0 if they don't. | ||
|
||
<h4>Syntax</h4> | ||
<pre>intersects_bbox( a, b )</pre> | ||
|
||
<h4>Arguments</h4> | ||
a → geometry | ||
b → geometry | ||
|
||
<h4>Example</h4> | ||
<pre>intersects_bbox( geomFromWKT( 'POINT(4 5)' ) , geom_from_wkt( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre> | ||
<pre>intersects_bbox( geomFromWKT( 'POINT(6 5)' ) , geom_from_wkt( 'POLYGON((3 3 , 4 4 , 5 5, 3 3))' )) → returns 0</pre> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h3>sym_difference function</h3> | ||
Returns a geometry that represents the portions of a and b that do not intersect. | ||
|
||
<h4>Syntax</h4> | ||
<pre>sym_difference( geometry a, geometry b)</pre> | ||
|
||
<h4>Arguments</h4> | ||
geometry → geometry | ||
geometry → geometry | ||
|
||
<h4>Example</h4> | ||
<pre> geom_to_wkt( sym_difference( geom_from_wkt( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geom_from_wkt( 'LINESTRING(3 3 , 8 8)' )) ) → returns LINESTRING(5 5, 8 8)</pre> |
6 changes: 3 additions & 3 deletions
6
resources/function_help/todate → resources/function_help/to_date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h3>todate() function</h3> | ||
<h3>to_date() function</h3> | ||
Convert a string into Qt data type. | ||
|
||
<h4>Syntax</h4> | ||
<code>todate('string')</code><br> | ||
<code>to_date('string')</code><br> | ||
|
||
<h4>Arguments</h4> | ||
<code>string</code> - is string in Qt date format. | ||
<br> | ||
|
||
<h4>Example</h4> | ||
<!-- Show example of function.--> | ||
<code>todate('2012-05-04') → 2012-05-04</code><br> | ||
<code>to_date('2012-05-04') → 2012-05-04</code><br> |
6 changes: 3 additions & 3 deletions
6
resources/function_help/todatetime → resources/function_help/to_datetime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h3>todatetime() function</h3> | ||
<h3>to_datetime() function</h3> | ||
Convert a string into Qt data time type. | ||
|
||
<h4>Syntax</h4> | ||
<code>todatetime('string')</code><br> | ||
<code>to_datetime('string')</code><br> | ||
|
||
<h4>Arguments</h4> | ||
<code>string</code> - is string in Qt date time format. | ||
<br> | ||
|
||
<h4>Example</h4> | ||
<!-- Show example of function.--> | ||
<code>todatetime('2012-05-04 12:50:00') → 2012-05-04T12:50:00</code><br> | ||
<code>to_datetime('2012-05-04 12:50:00') → 2012-05-04T12:50:00</code><br> |
6 changes: 3 additions & 3 deletions
6
resources/function_help/toint → resources/function_help/to_int
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h3>toint() function</h3> | ||
<h3>to_int() function</h3> | ||
Converts a string to integer number. Nothing changed if a value cannot be converted to integer (e.g '123asd' is invalid). | ||
|
||
<p><h4>Syntax</h4> | ||
toint(<i>string</i>)</p> | ||
to_int(<i>string</i>)</p> | ||
|
||
<p><h4>Arguments</h4> | ||
<!-- List args for functions here--> | ||
<i> string</i> → is string. The String to convert to integer number.</p> | ||
|
||
<p><h4>Example</h4> | ||
<!-- Show example of function.--> | ||
toint('123') → 123</p> | ||
to_int('123') → 123</p> |
6 changes: 3 additions & 3 deletions
6
resources/function_help/tointerval → resources/function_help/to_interval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h3>tointerval() function</h3> | ||
<h3>to_interval() function</h3> | ||
Converts a string to a interval type. Can be used to take days, hours, month, etc off a date. | ||
|
||
<h4>Syntax</h4> | ||
<code>tointerval('string')</code><br> | ||
<code>to_interval('string')</code><br> | ||
|
||
<h4>Arguments</h4> | ||
<code>string</code> - is string. Format {n} days {n} hours {n} months | ||
<br> | ||
|
||
<h4>Example</h4> | ||
<!-- Show example of function.--> | ||
<code>todatetime('2012-05-05 12:00:00') - tointerval('1 day 2 hours') → 2012-05-04T10:00:00</code><br> | ||
<code>todatetime('2012-05-05 12:00:00') - to_interval('1 day 2 hours') → 2012-05-04T10:00:00</code><br> |
6 changes: 3 additions & 3 deletions
6
resources/function_help/toreal → resources/function_help/to_real
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h3>toreal() function</h3> | ||
<h3>to_real() function</h3> | ||
Converts a string to real number. Nothing changed if a value cannot be converted to real (e.g '123.56asd' is invalid). Numbers are rounded after saving changes if the precision is smaller than the result of the conversion. | ||
|
||
<p><h4>Syntax</h4> | ||
toreal(<i>string</i>)</p> | ||
to_real(<i>string</i>)</p> | ||
|
||
<p><h4>Arguments</h4> | ||
<!-- List args for functions here--> | ||
<i> string</i> → is string. The String to convert to real number.</p> | ||
|
||
<p><h4>Example</h4> | ||
<!-- Show example of function.--> | ||
toreal('123.45') → 123.45</p> | ||
to_real('123.45') → 123.45</p> |
6 changes: 3 additions & 3 deletions
6
resources/function_help/tostring → resources/function_help/to_string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h3>tostring() function</h3> | ||
<h3>to_string() function</h3> | ||
Converts a number to string. | ||
|
||
<p><h4>Syntax</h4> | ||
tostring(<i>number</i>)</p> | ||
to_string(<i>number</i>)</p> | ||
|
||
<p><h4>Arguments</h4> | ||
<!-- List args for functions here--> | ||
<i>number</i> → is integer or real. The number to convert to string.</p> | ||
|
||
<p><h4>Example</h4> | ||
<!-- Show example of function.--> | ||
tostring(123) → '123'</p> | ||
to_string(123) → '123'</p> |
6 changes: 3 additions & 3 deletions
6
resources/function_help/totime → resources/function_help/to_time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h3>totime() function</h3> | ||
<h3>to_time() function</h3> | ||
Convert a string into Qt time type. | ||
|
||
<h4>Syntax</h4> | ||
<code>totime('string')</code><br> | ||
<code>to_time('string')</code><br> | ||
|
||
<h4>Arguments</h4> | ||
<code>string</code> - is string in Qt time format. | ||
<br> | ||
|
||
<h4>Example</h4> | ||
<!-- Show example of function.--> | ||
<code>totime('12:30:01') → 12:30:01</code><br> | ||
<code>to_time('12:30:01') → 12:30:01</code><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<h3>xat() function</h3> | ||
<h3>x_at() function</h3> | ||
Retrieves a x coordinate of the current feature | ||
|
||
<h4>Syntax</h4> | ||
<code>xat(i)</code> | ||
<code>x_at(i)</code> | ||
|
||
<h4>Arguments</h4> | ||
<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index). | ||
|
||
<h4>Example</h4> | ||
<pre>xat(1) → 5</pre> | ||
<pre>x_at(1) → 5</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<h3>xmax function</h3> | ||
<h3>x_max function</h3> | ||
Returns the maximum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. | ||
|
||
<h4>Syntax</h4> | ||
<pre>xmax(geom)</pre> | ||
<pre>x_max(geom)</pre> | ||
|
||
<h4>Arguments</h4> | ||
geom → a geometry | ||
|
||
<h4>Example</h4> | ||
<pre> xmax($geometry) → returns maximum x coordinate of $geometry</pre> | ||
<pre> x_max($geometry) → returns maximum x coordinate of $geometry</pre> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<h3>xmin function</h3> | ||
<h3>x_min function</h3> | ||
Returns the minimum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. | ||
|
||
<h4>Syntax</h4> | ||
<pre>xmin(geom)</pre> | ||
<pre>x_min(geom)</pre> | ||
|
||
<h4>Arguments</h4> | ||
geom → a geometry | ||
|
||
<h4>Example</h4> | ||
<pre> xmin($geometry) → returns minimum x coordinate of $geometry</pre> | ||
<pre> x_min($geometry) → returns minimum x coordinate of $geometry</pre> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<h3>yat() function</h3> | ||
<h3>y_at() function</h3> | ||
Retrieves a y coordinate of the current feature | ||
|
||
<h4>Syntax</h4> | ||
<code>yat(i)</code> | ||
<code>y_at(i)</code> | ||
|
||
<h4>Arguments</h4> | ||
<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index). | ||
|
||
<h4>Example</h4> | ||
<pre>yat(1) → 5</pre> | ||
<pre>y_at(1) → 5</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<h3>ymax function</h3> | ||
<h3>y_max function</h3> | ||
Returns the maximum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. | ||
|
||
<h4>Syntax</h4> | ||
<pre>ymax(geom)</pre> | ||
<pre>y_max(geom)</pre> | ||
|
||
<h4>Arguments</h4> | ||
geom → a geometry | ||
|
||
<h4>Example</h4> | ||
<pre> ymax($geometry) → returns maximum y coordinate of $geometry</pre> | ||
<pre> y_max($geometry) → returns maximum y coordinate of $geometry</pre> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<h3>ymin function</h3> | ||
<h3>y_min function</h3> | ||
Returns the minimum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. | ||
|
||
<h4>Syntax</h4> | ||
<pre>ymin(geom)</pre> | ||
<pre>y_min(geom)</pre> | ||
|
||
<h4>Arguments</h4> | ||
geom → a geometry | ||
|
||
<h4>Example</h4> | ||
<pre> ymin($geometry) → returns minimum y coordinate of $geometry</pre> | ||
<pre> y_min($geometry) → returns minimum y coordinate of $geometry</pre> | ||
|
Oops, something went wrong.