This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new a8c8ea76 [DOCS] Add example outputs to all Sedona functions - 3 (#919)
a8c8ea76 is described below

commit a8c8ea76771394ae45ef2badd48efa8b2e767a4c
Author: Furqaanahmed Khan <[email protected]>
AuthorDate: Tue Jul 25 13:56:30 2023 -0400

    [DOCS] Add example outputs to all Sedona functions - 3 (#919)
---
 docs/api/flink/Function.md | 94 +++++++++++++++++++++++++++++++---------------
 docs/api/sql/Function.md   | 87 +++++++++++++++++++++++++++---------------
 2 files changed, 119 insertions(+), 62 deletions(-)

diff --git a/docs/api/flink/Function.md b/docs/api/flink/Function.md
index 00284c70..edc13bdb 100644
--- a/docs/api/flink/Function.md
+++ b/docs/api/flink/Function.md
@@ -825,7 +825,11 @@ Example:
 SELECT ST_Degrees(0.19739555984988044)
 ```
 
-Output: 11.309932474020195
+Output: 
+
+```
+11.309932474020195
+```
 
 ## ST_Difference
 
@@ -861,7 +865,11 @@ SQL example:
 SELECT ST_Dump(ST_GeomFromText('MULTIPOINT ((10 40), (40 30), (20 20), (30 
10))'))
 ```
 
-Output: `[POINT (10 40), POINT (40 30), POINT (20 20), POINT (30 10)]`
+Output: 
+
+```
+[POINT (10 40), POINT (40 30), POINT (20 20), POINT (30 10)]
+```
 
 ## ST_DumpPoints
 
@@ -872,11 +880,16 @@ Format: `ST_DumpPoints(geom: geometry)`
 Since: `v1.5.0`
 
 Example:
+
 ```sql
 SELECT ST_DumpPoints(ST_GeomFromText('LINESTRING (0 0, 1 1, 1 0)'))
 ```
 
-Output: `[POINT (0 0), POINT (0 1), POINT (1 1), POINT (1 0), POINT (0 0)]`
+Output: 
+
+```
+[POINT (0 0), POINT (0 1), POINT (1 1), POINT (1 0), POINT (0 0)]
+```
 
 ## ST_EndPoint
 
@@ -887,11 +900,16 @@ Format: `ST_EndPoint(geom: geometry)`
 Since: `v1.5.0`
 
 Example:
+
 ```sql
 SELECT ST_EndPoint(ST_GeomFromText('LINESTRING(100 150,50 60, 70 80, 160 
170)'))
 ```
 
-Output: `POINT(160 170)`
+Output: 
+
+```
+POINT(160 170)
+```
 
 ## ST_Envelope
 
@@ -904,8 +922,13 @@ Since: `v1.3.0`
 Example:
 
 ```sql
-SELECT ST_Envelope(polygondf.countyshape)
-FROM polygondf
+SELECT ST_Envelope(ST_GeomFromWKT('LINESTRING(0 0, 1 3)'))
+```
+
+Output:
+
+```
+POLYGON ((0 0, 0 3, 1 3, 1 0, 0 0))
 ```
 
 ## ST_ExteriorRing
@@ -919,13 +942,14 @@ Since: `v1.2.1`
 Examples:
 
 ```sql
-SELECT ST_ExteriorRing(df.geometry)
-FROM df
+SELECT ST_ExteriorRing(ST_GeomFromText('POLYGON((0 0 1, 1 1 1, 1 2 1, 1 1 1, 0 
0 1))'))
 ```
 
-Input: `POLYGON ((0 0, 1 1, 2 1, 0 1, 1 -1, 0 0))`
+Output:
 
-Output: `LINESTRING (0 0, 1 1, 2 1, 0 1, 1 -1, 0 0)`
+```
+LINESTRING (0 0, 1 1, 1 2, 1 1, 0 0)
+```
 
 ## ST_FlipCoordinates
 
@@ -935,15 +959,17 @@ Format: `ST_FlipCoordinates(A:geometry)`
 
 Since: `v1.2.0`
 
-Spark SQL example:
+Example:
+
 ```sql
-SELECT ST_FlipCoordinates(df.geometry)
-FROM df
+SELECT ST_FlipCoordinates(ST_GeomFromWKT("POINT (1 2)"))
 ```
 
-Input: `POINT (1 2)`
+Output:
 
-Output: `POINT (2 1)`
+```
+POINT (2 1)
+```
 
 ## ST_Force_2D
 
@@ -956,13 +982,14 @@ Since: `v1.2.1`
 Example:
 
 ```sql
-SELECT ST_Force_2D(df.geometry) AS geom
-FROM df
+SELECT ST_Force_2D(ST_GeomFromText('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 
1 2,1 3 2,1 1 2))'))
 ```
 
-Input: `POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2))`
+Output:
 
-Output: `POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))`
+```
+POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))
+```
 
 ## ST_Force3D
 Introduction: Forces the geometry into a 3-dimensional model so that all 
output representations will have X, Y and Z coordinates.
@@ -1039,20 +1066,14 @@ Since: `v1.2.0`
 
 Example: 
 
-Query:
-
 ```sql
 SELECT ST_GeoHash(ST_GeomFromText('POINT(21.427834 52.042576573)'), 5) AS 
geohash
 ```
 
-Result:
+Output:
 
 ```
-+-----------------------------+
-|geohash                      |
-+-----------------------------+
-|u3r0p                        |
-+-----------------------------+
+u3r0p
 ```
 
 ## ST_GeometricMedian
@@ -1073,7 +1094,7 @@ Format: `ST_GeometricMedian(geom: geometry)`
 
 Default parameters: `tolerance: 1e-6, maxIter: 1000, failIfNotConverged: false`
 
-Since: `1.4.1`
+Since: `v1.4.1`
 
 Example:
 ```sql
@@ -1094,11 +1115,16 @@ Format: `ST_GeometryN(geom: geometry, n: Int)`
 Since: `v1.3.0`
 
 Example:
+
 ```sql
 SELECT ST_GeometryN(ST_GeomFromText('MULTIPOINT((1 2), (3 4), (5 6), (8 9))'), 
1)
 ```
 
-Output: `POINT (3 4)`
+Output: 
+
+```
+POINT (3 4)
+```
 
 ## ST_GeometryType
 
@@ -1109,9 +1135,15 @@ Format: `ST_GeometryType (A:geometry)`
 Since: `v1.5.0`
 
 Example:
+
 ```sql
-SELECT ST_GeometryType(polygondf.countyshape)
-FROM polygondf
+SELECT ST_GeometryType(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 
29.26,77.27 29.31,77.29 29.07)'))
+```
+
+Output:
+
+```
+ST_LINESTRING
 ```
 
 ## ST_HausdorffDistance
diff --git a/docs/api/sql/Function.md b/docs/api/sql/Function.md
index 1d38af89..a8a992bf 100644
--- a/docs/api/sql/Function.md
+++ b/docs/api/sql/Function.md
@@ -874,7 +874,11 @@ Spark SQL example:
 SELECT ST_Dump(ST_GeomFromText('MULTIPOINT ((10 40), (40 30), (20 20), (30 
10))'))
 ```
 
-Output: `[POINT (10 40), POINT (40 30), POINT (20 20), POINT (30 10)]`
+Output: 
+
+```
+[POINT (10 40), POINT (40 30), POINT (20 20), POINT (30 10)]
+```
 
 ## ST_DumpPoints
 
@@ -885,11 +889,16 @@ Format: `ST_DumpPoints(geom: geometry)`
 Since: `v1.0.0`
 
 Spark SQL example:
+
 ```sql
 SELECT ST_DumpPoints(ST_GeomFromText('LINESTRING (0 0, 1 1, 1 0)'))
 ```
 
-Output: `[POINT (0 0), POINT (0 1), POINT (1 1), POINT (1 0), POINT (0 0)]`
+Output: 
+
+```
+[POINT (0 0), POINT (0 1), POINT (1 1), POINT (1 0), POINT (0 0)]
+```
 
 ## ST_EndPoint
 
@@ -900,11 +909,16 @@ Format: `ST_EndPoint(geom: geometry)`
 Since: `v1.0.0`
 
 Spark SQL example:
+
 ```sql
 SELECT ST_EndPoint(ST_GeomFromText('LINESTRING(100 150,50 60, 70 80, 160 
170)'))
 ```
 
-Output: `POINT(160 170)`
+Output: 
+
+```
+POINT(160 170)
+```
 
 ## ST_Envelope
 
@@ -917,8 +931,13 @@ Since: `v1.0.0`
 Spark SQL example:
 
 ```sql
-SELECT ST_Envelope(polygondf.countyshape)
-FROM polygondf
+SELECT ST_Envelope(ST_GeomFromWKT('LINESTRING(0 0, 1 3)'))
+```
+
+Output:
+
+```
+POLYGON ((0 0, 0 3, 1 3, 1 0, 0 0))
 ```
 
 ## ST_ExteriorRing
@@ -930,11 +949,16 @@ Format: `ST_ExteriorRing(geom: geometry)`
 Since: `v1.0.0`
 
 Spark SQL example:
+
 ```sql
 SELECT ST_ExteriorRing(ST_GeomFromText('POLYGON((0 0 1, 1 1 1, 1 2 1, 1 1 1, 0 
0 1))'))
 ```
 
-Output: `LINESTRING (0 0, 1 1, 1 2, 1 1, 0 0)`
+Output: 
+
+```
+LINESTRING (0 0, 1 1, 1 2, 1 1, 0 0)
+```
 
 ## ST_FlipCoordinates
 
@@ -945,14 +969,16 @@ Format: `ST_FlipCoordinates(A:geometry)`
 Since: `v1.0.0`
 
 Spark SQL example:
+
 ```sql
-SELECT ST_FlipCoordinates(df.geometry)
-FROM df
+SELECT ST_FlipCoordinates(ST_GeomFromWKT("POINT (1 2)"))
 ```
 
-Input: `POINT (1 2)`
+Output: 
 
-Output: `POINT (2 1)`
+```
+POINT (2 1)
+```
 
 ## ST_Force_2D
 
@@ -965,19 +991,13 @@ Since: `v1.2.1`
 Example:
 
 ```sql
-SELECT ST_AsText(
-    ST_Force_2D(ST_GeomFromText('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 
2,1 3 2,1 1 2))'))
-) AS geom
+SELECT ST_Force_2D(ST_GeomFromText('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 
1 2,1 3 2,1 1 2))'))
 ```
 
-Result:
+Output:
 
 ```
-+---------------------------------------------------------------+
-|geom                                                           |
-+---------------------------------------------------------------+
-|POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))                   |
-+---------------------------------------------------------------+
+POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))
 ```
 
 ## ST_Force3D
@@ -1053,20 +1073,14 @@ Since: `v1.1.1`
 
 Example:
 
-Query:
-
 ```sql
 SELECT ST_GeoHash(ST_GeomFromText('POINT(21.427834 52.042576573)'), 5) AS 
geohash
 ```
 
-Result:
+Output:
 
 ```
-+-----------------------------+
-|geohash                      |
-+-----------------------------+
-|u3r0p                        |
-+-----------------------------+
+u3r0p
 ```
 
 ## ST_GeometricMedian
@@ -1087,7 +1101,7 @@ Format: `ST_GeometricMedian(geom: geometry)`
 
 Default parameters: `tolerance: 1e-6, maxIter: 1000, failIfNotConverged: false`
 
-Since: `1.4.1`
+Since: `v1.4.1`
 
 Example:
 ```sql
@@ -1108,11 +1122,16 @@ Format: `ST_GeometryN(geom: geometry, n: Int)`
 Since: `v1.0.0`
 
 Spark SQL example:
+
 ```sql
 SELECT ST_GeometryN(ST_GeomFromText('MULTIPOINT((1 2), (3 4), (5 6), (8 9))'), 
1)
 ```
 
-Output: `POINT (3 4)`
+Output: 
+
+```
+POINT (3 4)
+```
 
 ## ST_GeometryType
 
@@ -1123,9 +1142,15 @@ Format: `ST_GeometryType (A:geometry)`
 Since: `v1.0.0`
 
 Spark SQL example:
+
 ```sql
-SELECT ST_GeometryType(polygondf.countyshape)
-FROM polygondf
+SELECT ST_GeometryType(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 
29.26,77.27 29.31,77.29 29.07)'))
+```
+
+Output:
+
+```
+ST_LINESTRING
 ```
 
 ## ST_HausdorffDistance

Reply via email to