You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "MrPowers (via GitHub)" <gi...@apache.org> on 2025/11/26 15:19:04 UTC

[PR] docs: sql v0.2 [sedona-db]

MrPowers opened a new pull request, #368:
URL: https://github.com/apache/sedona-db/pull/368

   This PR adds API docs for the SQL functions that are added in v0.2.
   
   I still need to get the library setup locally and double-check all the code snippets.  Also need to add some more functions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: sql v0.2 [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on PR #368:
URL: https://github.com/apache/sedona-db/pull/368#issuecomment-3602942440

   @MrPowers I see this is marked as a draft. Is this ready for review?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: sql v0.2 [sedona-db]

Posted by "MrPowers (via GitHub)" <gi...@apache.org>.
MrPowers commented on PR #368:
URL: https://github.com/apache/sedona-db/pull/368#issuecomment-3604121167

   @paleolimbot - this is ready for your review now!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: sql v0.2 [sedona-db]

Posted by "MrPowers (via GitHub)" <gi...@apache.org>.
MrPowers commented on code in PR #368:
URL: https://github.com/apache/sedona-db/pull/368#discussion_r2569940141


##########
docs/reference/sql.md:
##########
@@ -110,12 +111,38 @@ Return the Well-Known Text string representation of a geometry or geography.
 SELECT ST_AsText(ST_Point(1.0, 2.0))
 ```
 
+## ST_Azimuth
+
+Introduction: Returns Azimuth for two given points in radians null otherwise.
+
+Format: ST_Azimuth(pointA: Point, pointB: Point)
+
+Since: v0.2.
+
+```sql
+SELECT ST_Azimuth(ST_POINT(0.0, 25.0), ST_POINT(0.0, 0.0))
+```
+
+## ST_Boundary
+
+Returns the closure of the combinatorial boundary of this Geometry.
+
+Format: `ST_Boundary(geom: Geometry)`
+
+Since: v0.2.
+
+```sql
+SELECT ST_Boundary(ST_GeomFromWKT('POLYGON((1 1,0 0, -1 1, 1 1))'))
+```
+
 ## ST_Buffer
 
 #### Description
 
 Returns a geometry that represents all points whose distance from the input geometry is less than or equal to a specified distance.
 
+Since: v0.1.

Review Comment:
   Good call, I like "changed in version..."!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: sql v0.2 [sedona-db]

Posted by "petern48 (via GitHub)" <gi...@apache.org>.
petern48 commented on code in PR #368:
URL: https://github.com/apache/sedona-db/pull/368#discussion_r2565556763


##########
docs/reference/sql.md:
##########
@@ -110,12 +111,38 @@ Return the Well-Known Text string representation of a geometry or geography.
 SELECT ST_AsText(ST_Point(1.0, 2.0))
 ```
 
+## ST_Azimuth
+
+Introduction: Returns Azimuth for two given points in radians null otherwise.
+
+Format: ST_Azimuth(pointA: Point, pointB: Point)
+
+Since: v0.2.
+
+```sql
+SELECT ST_Azimuth(ST_POINT(0.0, 25.0), ST_POINT(0.0, 0.0))
+```
+
+## ST_Boundary
+
+Returns the closure of the combinatorial boundary of this Geometry.
+
+Format: `ST_Boundary(geom: Geometry)`
+
+Since: v0.2.
+
+```sql
+SELECT ST_Boundary(ST_GeomFromWKT('POLYGON((1 1,0 0, -1 1, 1 1))'))
+```
+
 ## ST_Buffer
 
 #### Description
 
 Returns a geometry that represents all points whose distance from the input geometry is less than or equal to a specified distance.
 
+Since: v0.1.

Review Comment:
   ```suggestion
   Returns a geometry that represents all points whose distance from the input geometry is less than or equal to a specified distance.
   
   Since: v0.1.
   
   Changed in version v0.2: Support buffer parameters argument
   ```
   
   Something that might be easy to miss is that we added support for buffer params: https://github.com/apache/sedona-db/pull/241
   
   I always appreciate docs that mention versions when functions were added or received notable updates. More effort on us, but super helpful for developers. Pyspark does "versionchanged" along w/ a short comment like this [example](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.DataFrame.html). I proposed a similar way to do it in the suggestion, but feel free to modify.
   
   Here's a helpful docstring for updating the rest of the buffer docs
   https://github.com/apache/sedona-db/blob/79cada0cae30b63ffd26592d8f671adf169fbe2a/c/sedona-geos/src/st_buffer.rs#L37-L47



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: sql v0.2 [sedona-db]

Posted by "petern48 (via GitHub)" <gi...@apache.org>.
petern48 commented on code in PR #368:
URL: https://github.com/apache/sedona-db/pull/368#discussion_r2565580572


##########
docs/reference/sql.md:
##########
@@ -516,6 +687,8 @@ SELECT ST_AsText(ST_GeomFromWKB(FROM_HEX('0101000000000000000000F03F000000000000
 
 Construct a Geometry from WKT. This function also has the alias **ST_GeomFromText**.

Review Comment:
   ```suggestion
   Construct a Geometry from WKT. This function also has the aliases **ST_GeomFromText** and ** ST_GeometryFromText**
   ```
   Another thing easy to miss: new alias https://github.com/apache/sedona-db/pull/213



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] docs: sql v0.2 [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #368:
URL: https://github.com/apache/sedona-db/pull/368#discussion_r2582937002


##########
docs/reference/sql.md:
##########
@@ -110,12 +111,38 @@ Return the Well-Known Text string representation of a geometry or geography.
 SELECT ST_AsText(ST_Point(1.0, 2.0))
 ```
 
+## ST_Azimuth
+
+Introduction: Returns Azimuth for two given points in radians null otherwise.
+
+Format: ST_Azimuth(pointA: Point, pointB: Point)
+
+Since: v0.2.
+
+```sql
+SELECT ST_Azimuth(ST_POINT(0.0, 25.0), ST_POINT(0.0, 0.0))
+```
+
+## ST_Boundary
+
+Returns the closure of the combinatorial boundary of this Geometry.
+
+Format: `ST_Boundary(geom: Geometry)`
+
+Since: v0.2.
+
+```sql
+SELECT ST_Boundary(ST_GeomFromWKT('POLYGON((1 1,0 0, -1 1, 1 1))'))
+```
+
 ## ST_Buffer
 
 #### Description
 
 Returns a geometry that represents all points whose distance from the input geometry is less than or equal to a specified distance.
 
+Since: v0.1.

Review Comment:
   Did you want to apply this?



##########
docs/reference/sql.md:
##########
@@ -676,7 +766,40 @@ Return true if geomA intersects geomB.
 #### SQL Example
 
 ```sql
-SELECT ST_Intersects(ST_Point(0.25 0.25), ST_GeomFromText('POLYGON ((0 0, 1 0, 0 1, 0 0))')) AS val
+SELECT ST_Intersects(ST_Point(0.25, 0.25), ST_GeomFromText('POLYGON ((0 0, 1 0, 0 1, 0 0))')) AS val;
+```
+
+## ST_IsClosed
+
+RETURNS true if the LINESTRING start and end point are the same.
+
+Format: `ST_IsClosed(geom: Geometry)`
+
+Since: v0.2.
+
+```sql
+SELECT ST_IsClosed(ST_GeomFromText('LINESTRING(0 0, 1 1, 1 0)'));
+```
+
+## ST_IsCollection
+
+Returns TRUE if the geometry type of the input is a geometry collection type. Collection types are the following:
+
+```sql

Review Comment:
   ````suggestion
   ```
   ````



##########
docs/reference/sql.md:
##########
@@ -516,6 +687,8 @@ SELECT ST_AsText(ST_GeomFromWKB(FROM_HEX('0101000000000000000000F03F000000000000
 
 Construct a Geometry from WKT. This function also has the alias **ST_GeomFromText**.

Review Comment:
   Did you want to apply this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org