jiayuasu opened a new pull request, #2726:
URL: https://github.com/apache/sedona/pull/2726

   ## Did you read the Contributor Guide?
   - Yes, I have read the [Contributor 
Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor 
Development Guide](https://sedona.apache.org/latest/community/develop/)
   
   ## Is this PR related to a ticket?
   - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #2725
   
   ## What changes were proposed in this PR?
   
   Implement 6 GeoSeries functions for the geopandas compatibility module:
   
   **General methods and attributes:**
   - `type` (property) — alias for `geom_type`, returns geometry type names as 
a Series
   - `m` (property) -> `ST_M` — returns the M coordinate of point geometries
   
   **Constructive methods:**
   - `delaunay_triangles(tolerance, only_edges)` -> `ST_DelaunayTriangles`
   - `voronoi_polygons(tolerance, extend_to, only_edges)` -> 
`ST_VoronoiPolygons`
   
   **Binary predicates:**
   - `disjoint(other, align)` -> `ST_Disjoint`
   
   **Aggregation:**
   - `unary_union` (property) — deprecated, delegates to `union_all()` with 
`FutureWarning`
   
   Also fixes `GeoDataFrame.type` to delegate to `geom_type` instead of raising 
`NotImplementedError`.
   
   Each function follows the established pattern from #2701 and #2710:
   - **base.py**: Docstring with examples + `_delegate_to_geometry_column` call
   - **geoseries.py**: ST function call via `_query_geometry_column` or 
`_row_wise_operation`
   - **test_geoseries.py**: Unit test with expected values + GeoDataFrame 
delegation check
   - **test_match_geopandas_series.py**: Comparison test against real geopandas 
output
   
   **Semantic differences documented:**
   - `delaunay_triangles` and `voronoi_polygons` operate **per row** (each 
input geometry produces a `GeometryCollection`), unlike geopandas which 
collects all vertices across the GeoSeries and computes a single result. This 
is noted in the docstrings.
   
   **Not included (blocked by upstream Sedona bugs):**
   - `geom_equals` — #2722 (`ST_Equals` crashes on `GeometryCollection` inputs)
   - `frechet_distance` — #2720 (`ST_FrechetDistance` returns 0.0 for empty 
geometries)
   - `hausdorff_distance` — #2721 (`ST_HausdorffDistance` returns 0.0 for empty 
geometries)
   
   ## How was this patch tested?
   
   12 new tests (6 unit tests + 6 match tests) all passing locally.
   
   ## Did this PR include necessary documentation updates?
   
   - No, this PR does not affect any public API so no need to change the 
documentation.
   


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