Copilot commented on code in PR #2668:
URL: https://github.com/apache/sedona/pull/2668#discussion_r2836540516


##########
docs/api/sql/Function.md:
##########
@@ -736,6 +736,189 @@ Output:
 32618
 ```
 
+## ST_BingTile
+
+Introduction: Creates a Bing Tile quadkey from tile XY coordinates and a zoom 
level.
+
+Format: `ST_BingTile(tileX: Integer, tileY: Integer, zoomLevel: Integer)`
+
+Since: `v1.9.0`
+
+SQL Example
+
+```sql
+SELECT ST_BingTile(3, 5, 3)
+```
+
+Output:
+
+```
+213
+```
+
+## ST_BingTileAt
+
+Introduction: Returns the Bing Tile quadkey for a given point (longitude, 
latitude) at a specified zoom level.
+
+Format: `ST_BingTileAt(longitude: Double, latitude: Double, zoomLevel: 
Integer)`
+
+Since: `v1.9.0`
+
+SQL Example
+
+```sql
+SELECT ST_BingTileAt(60, 30.12, 15)
+```
+
+Output:
+
+```
+123030123010121
+```
+
+## ST_BingTileCellIDs
+
+Introduction: Returns an array of Bing Tile quadkey strings that cover the 
given geometry at the specified zoom level.
+
+Format: `ST_BingTileCellIDs(geom: Geometry, zoomLevel: Integer)`
+
+Since: `v1.9.0`
+
+SQL Example
+
+```sql
+SELECT ST_BingTileCellIDs(ST_GeomFromText('POINT(60 30.12)'), 10)
+```
+
+Output:
+
+```
+[1230301230]
+```
+
+## ST_BingTilePolygon
+
+Introduction: Returns the bounding polygon (Geometry) of the Bing Tile 
identified by the given quadkey.
+
+Format: `ST_BingTilePolygon(quadKey: String)`
+
+Since: `v1.9.0`
+
+SQL Example
+
+```sql
+SELECT ST_AsText(ST_BingTilePolygon('213'))
+```
+
+Output:
+
+```
+POLYGON ((0 0, 0 -40.97989806962013, 45 -40.97989806962013, 45 0, 0 0))
+```
+
+## ST_BingTilesAround
+
+Introduction: Returns an array of Bing Tile quadkey strings representing the 
neighborhood tiles around the tile that contains the given point (longitude, 
latitude) at the specified zoom level. Returns the 3×3 neighborhood (up to 9 
tiles), or fewer tiles at the edges/corners of the map.
+
+Format: `ST_BingTilesAround(longitude: Double, latitude: Double, zoomLevel: 
Integer)`
+
+Since: `v1.9.0`
+
+SQL Example
+
+```sql
+SELECT ST_BingTilesAround(60, 30.12, 1)
+```
+
+Output:
+
+```
+[0, 2, 1, 3]
+```
+
+## ST_BingTileToGeom
+
+Introduction: Returns an array of Polygons for the corresponding Bing Tile 
quadkeys.

Review Comment:
   The documentation states "Returns an array of Polygons" but this is 
inaccurate for how ST_BingTileToGeom actually behaves in Spark. The function 
returns an array of Geometry objects (which happen to be Polygons), not 
specifically typed as an array of Polygons. This matters for type clarity. 
Consider revising to "Returns an array of Polygon geometries" to be more 
precise.
   ```suggestion
   Introduction: Returns an array of Polygon geometries for the corresponding 
Bing Tile quadkeys.
   ```



##########
docs/api/flink/Function.md:
##########
@@ -663,6 +663,189 @@ Output:
 32618
 ```
 
+## ST_BingTile
+
+Introduction: Creates a Bing Tile quadkey from tile XY coordinates and a zoom 
level.
+
+Format: `ST_BingTile(tileX: Integer, tileY: Integer, zoomLevel: Integer)`
+
+Since: `v1.9.0`
+
+Example:
+
+```sql
+SELECT ST_BingTile(3, 5, 3)
+```
+
+Output:
+
+```
+213
+```
+
+## ST_BingTileAt
+
+Introduction: Returns the Bing Tile quadkey for a given point (longitude, 
latitude) at a specified zoom level.
+
+Format: `ST_BingTileAt(longitude: Double, latitude: Double, zoomLevel: 
Integer)`
+
+Since: `v1.9.0`
+
+Example:
+
+```sql
+SELECT ST_BingTileAt(60, 30.12, 15)
+```
+
+Output:
+
+```
+123030123010121
+```
+
+## ST_BingTileCellIDs
+
+Introduction: Returns an array of Bing Tile quadkey strings that cover the 
given geometry at the specified zoom level.
+
+Format: `ST_BingTileCellIDs(geom: Geometry, zoomLevel: Integer)`
+
+Since: `v1.9.0`
+
+Example:
+
+```sql
+SELECT ST_BingTileCellIDs(ST_GeomFromText('POINT(60 30.12)'), 10)
+```
+
+Output:
+
+```
+[1230301230]
+```
+
+## ST_BingTilePolygon
+
+Introduction: Returns the bounding polygon (Geometry) of the Bing Tile 
identified by the given quadkey.
+
+Format: `ST_BingTilePolygon(quadKey: String)`
+
+Since: `v1.9.0`
+
+Example:
+
+```sql
+SELECT ST_AsText(ST_BingTilePolygon('213'))
+```
+
+Output:
+
+```
+POLYGON ((0 0, 0 -40.97989806962013, 45 -40.97989806962013, 45 0, 0 0))
+```
+
+## ST_BingTilesAround
+
+Introduction: Returns an array of Bing Tile quadkey strings representing the 
neighborhood tiles around the tile that contains the given point (longitude, 
latitude) at the specified zoom level. Returns the 3×3 neighborhood (up to 9 
tiles), or fewer tiles at the edges/corners of the map.
+
+Format: `ST_BingTilesAround(longitude: Double, latitude: Double, zoomLevel: 
Integer)`
+
+Since: `v1.9.0`
+
+Example:
+
+```sql
+SELECT ST_BingTilesAround(60, 30.12, 1)
+```
+
+Output:
+
+```
+[0, 2, 1, 3]
+```
+
+## ST_BingTileToGeom
+
+Introduction: Returns an array of Polygons for the corresponding Bing Tile 
quadkeys.

Review Comment:
   The documentation states "Returns an array of Polygons" but this is 
inaccurate for how ST_BingTileToGeom actually behaves in Flink. The function 
returns an array of Geometry objects (which happen to be Polygons), not 
specifically typed as an array of Polygons. This matters for type clarity. 
Consider revising to "Returns an array of Polygon geometries" to be more 
precise.
   ```suggestion
   Introduction: Returns an array of polygon geometries for the corresponding 
Bing Tile quadkeys.
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to