jiayuasu commented on code in PR #2726:
URL: https://github.com/apache/sedona/pull/2726#discussion_r2921571032


##########
python/sedona/spark/geopandas/geoseries.py:
##########
@@ -984,12 +981,28 @@ def convex_hull(self) -> "GeoSeries":
         )
 
     def delaunay_triangles(self, tolerance=0.0, only_edges=False):
-        # Implementation of the abstract method.
-        raise NotImplementedError("This method is not implemented yet.")
+        spark_expr = stf.ST_DelaunayTriangles(
+            self.spark.column, tolerance, int(only_edges)
+        )

Review Comment:
   The existing tests already cover the default path. Adding edge-case tests 
for `only_edges=True` is out of scope for this PR.



##########
python/sedona/spark/geopandas/geoseries.py:
##########
@@ -984,12 +981,28 @@ def convex_hull(self) -> "GeoSeries":
         )
 
     def delaunay_triangles(self, tolerance=0.0, only_edges=False):
-        # Implementation of the abstract method.
-        raise NotImplementedError("This method is not implemented yet.")
+        spark_expr = stf.ST_DelaunayTriangles(
+            self.spark.column, tolerance, int(only_edges)
+        )
+        return self._query_geometry_column(
+            spark_expr,
+            returns_geom=True,
+        )
 
     def voronoi_polygons(self, tolerance=0.0, extend_to=None, 
only_edges=False):
-        # Implementation of the abstract method.
-        raise NotImplementedError("This method is not implemented yet.")
+        if only_edges:
+            raise NotImplementedError(
+                "Sedona does not support only_edges=True for voronoi_polygons."
+            )
+        if extend_to is not None:
+            raise NotImplementedError(
+                "Sedona does not support extend_to for voronoi_polygons."
+            )

Review Comment:
   The `voronoi_polygons(only_edges=True)` test already exists in 
`test_voronoi_polygons`. The `extend_to` guard follows the same pattern — out 
of scope for additional tests in this PR.



-- 
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