mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
added new help files for geometry functions
This commit is contained in:
parent
a1a95c179f
commit
6adc8746e9
12
resources/function_help/$geometry
Normal file
12
resources/function_help/$geometry
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>$geometry function</h3>
|
||||
Returns the geometry of the current feature. Can be used for processing with other functions.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>$geometry</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
None
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> geomToWKT( $geometry ) → POINT(6 50)</pre>
|
||||
|
13
resources/function_help/buffer
Normal file
13
resources/function_help/buffer
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>buffer function</h3>
|
||||
Returns a geometry that represents all points whose distance from this geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>geomFromWKT(text)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
float → radius of buffer
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> buffer($geometry, 10.5 ) → returns a polygon</pre>
|
||||
|
12
resources/function_help/centroid
Normal file
12
resources/function_help/centroid
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>centroid function</h3>
|
||||
Returns the geometric center of a geometry.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>centroid(geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> centroid($geometry) → returns a point geometry</pre>
|
||||
|
13
resources/function_help/combine
Normal file
13
resources/function_help/combine
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>combine function</h3>
|
||||
Returns the combination of geometry a and geometry b.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>combine( geometry a , geometry b)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> geomToWKT( combine( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5 )' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4, 2 1 )' )) ) → returns MULTILINESTRING((4 4, 2 1), (3 3, 4 4), (4 4, 5 5)) </pre>
|
||||
<pre> geomToWKT( combine( geomFromWKT( 'LINESTRING(3 3 , 4 4 )' ) , geomFromWKT( 'LINESTRING(3 3 , 6 6, 2 1 )' )) ) → returns LINESTRING(3 3, 4 4, 6 6, 2 1) </pre>
|
13
resources/function_help/contains
Normal file
13
resources/function_help/contains
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>contains function</h3>
|
||||
Returns true if and only if no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>contains( geometry a , geometry a)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> contains( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'POINT( 0.5 0.5 )' )) → returns 1</pre>
|
||||
<pre> contains( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 0</pre>
|
13
resources/function_help/crosses
Normal file
13
resources/function_help/crosses
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>crosses function</h3>
|
||||
Returns 1 if the supplied geometries have some, but not all, interior points in common.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>crosses( $geometry , $geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> crosses( geomFromWKT( 'LINESTRING(3 5 , 4 4 , 5 3)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>
|
||||
<pre> crosses( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 0</pre>
|
12
resources/function_help/difference
Normal file
12
resources/function_help/difference
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>difference function</h3>
|
||||
Returns a geometry that represents that part of geometry a that does not intersect with geometry a.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>difference( geometry a , geometry b)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> geomToWKT( difference( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4)' )) ) → returns LINESTRING(4 4, 5 5)</pre>
|
13
resources/function_help/disjoint
Normal file
13
resources/function_help/disjoint
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>disjoint function</h3>
|
||||
Returns 1 if the Geometries do not "spatially intersect" - if they do not share any space together.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>disjoint( $geometry , $geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> disjoint( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>
|
||||
<pre> disjoint( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'POINT(4 4)' )) → returns 0</pre>
|
12
resources/function_help/distance
Normal file
12
resources/function_help/distance
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>distance function</h3>
|
||||
Returns the minimum distance (based on spatial ref) between two geometries in projected units.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>distance( $geometry , $geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> distance( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(4 8)' )) → returns 4</pre>
|
12
resources/function_help/geomFromGML
Normal file
12
resources/function_help/geomFromGML
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>geomFromGML function</h3>
|
||||
Returns a geometry from a GML representation of geometry
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>geomFromGML(text)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
text → GML representation of a geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> geomFromGML( '<gml:LineString srsName="EPSG:4326"><gml:coordinates>4,4 5,5 6,6</gml:coordinates></gml:LineString>') → returns a geometry</pre>
|
||||
|
12
resources/function_help/geomFromWKT
Normal file
12
resources/function_help/geomFromWKT
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>geomFromWKT function</h3>
|
||||
Returns a geometry created from a Well-Known Text (WKT) representation.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>geomFromWKT(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>
|
||||
|
12
resources/function_help/geomToWKT
Normal file
12
resources/function_help/geomToWKT
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>geomToWKT function</h3>
|
||||
Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>geomToWKT($geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
$geometry → geometry of your current feature
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> geomToWKT( $geometry ) → POINT(6 50)</pre>
|
||||
|
12
resources/function_help/intersection
Normal file
12
resources/function_help/intersection
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>intersection function</h3>
|
||||
Returns a geometry that represents the shared portion of geometry a and geometry b.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>intersection( geometry a , geometry b)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> geomToWKT( intersection( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 )' )) ) → returns LINESTRING(3 3, 4 4)</pre>
|
13
resources/function_help/intersects
Normal file
13
resources/function_help/intersects
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>intersects function</h3>
|
||||
Returns 1 if the geometries spatially intersect (share any portion of space) and 0 if they don't.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>intersects( $geometry , $geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> intersects( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>
|
||||
<pre> intersects( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'POINT(5 5)' )) → returns 0</pre>
|
13
resources/function_help/overlaps
Normal file
13
resources/function_help/overlaps
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>overlaps function</h3>
|
||||
Returns 1 if the Geometries share space, are of the same dimension, but are not completely contained by each other.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>overlaps( $geometry , $geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> overlaps( geomFromWKT( 'LINESTRING(3 5 , 4 4 , 5 5 , 5 3)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>
|
||||
<pre> overlaps( geomFromWKT( 'LINESTRING(0 0 , 1 1)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 0</pre>
|
13
resources/function_help/touches
Normal file
13
resources/function_help/touches
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>touches function</h3>
|
||||
Returns 1 if the geometries have at least one point in common, but their interiors do not intersect.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>touches( $geometry , $geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> touches( geomFromWKT( 'LINESTRING(5 3 , 4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) → returns 1</pre>
|
||||
<pre> touches( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) → returns 0</pre>
|
12
resources/function_help/union
Normal file
12
resources/function_help/union
Normal file
@ -0,0 +1,12 @@
|
||||
<h3>union function</h3>
|
||||
Returns a geometry that represents the point set union of the geometries.
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>union( $geometry , $geometry)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> geomToWKT( union( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) ) → returns MULTIPOINT(4 4, 5 5)</pre>
|
13
resources/function_help/within
Normal file
13
resources/function_help/within
Normal file
@ -0,0 +1,13 @@
|
||||
<h3>within function</h3>
|
||||
Returns 1 if the geometry a is completely inside geometry b
|
||||
|
||||
<h4>Syntax</h4>
|
||||
<pre>within( geometry a , geometry b)</pre>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
geometry → geometry
|
||||
geometry → geometry
|
||||
|
||||
<h4>Example</h4>
|
||||
<pre> within( geomFromWKT( 'POINT( 0.5 0.5 )') , geomFromWKT('POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) ) → returns 1</pre>
|
||||
<pre> within( geomFromWKT( 'POINT( 5 5 )') , geomFromWKT('POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) ) → returns 0</pre>
|
Loading…
x
Reference in New Issue
Block a user