Skip to content

[GH-3180] GeoPandas: Implement distributed cx and clip APIs - #3183

Merged
jiayuasu merged 8 commits into
apache:masterfrom
jiayuasu:feature/geopandas-spatial-subsetting
Jul 28, 2026
Merged

[GH-3180] GeoPandas: Implement distributed cx and clip APIs#3183
jiayuasu merged 8 commits into
apache:masterfrom
jiayuasu:feature/geopandas-spatial-subsetting

Conversation

@jiayuasu

@jiayuasu jiayuasu commented Jul 27, 2026

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

This PR implements the GeoPandas-compatible cx coordinate indexer and clip APIs for distributed GeoSeries and GeoDataFrame objects.

The implementation uses native Spark and Sedona expressions for spatial filtering, clipping, rectangle fast paths, and distributed mask aggregation. It preserves indexes, active geometry columns, CRS/SRID metadata, input ordering, keep_geom_type behavior, and all-null geometry CRS metadata without collecting geometry rows to the driver.

English and Chinese GeoPandas API documentation are updated for the new APIs.
The development dependency set includes Rtree on Python 3.8 so GeoPandas
0.13 clip parity tests have a spatial-index backend.

How was this patch tested?

  • python/tests/geopandas/test_spatial_subsetting.py (16 tests)
  • Existing test_set_crs regression test
  • Python 3.8 with GeoPandas 0.13.2, Shapely 1.8.5, and Rtree 1.3.0
  • Repository pre-commit hooks

The tests cover GeoSeries and GeoDataFrame inputs, coordinate slices, geometry and rectangle masks, distributed masks, collection-triggered multipart explosion, mixed-family filtering without explosion, null-first collection results, null/empty/all-null geometries, CRS/SRID preservation, MultiIndex inputs, ordering, and validation behavior.

Did this PR include necessary documentation updates?

  • Yes, I am adding new APIs. I am using the current SNAPSHOT version number v1.9.1.
  • Yes, I have updated the documentation.

@jiayuasu jiayuasu added this to the sedona-1.9.1 milestone Jul 28, 2026
@jiayuasu
jiayuasu merged commit 2357a5d into apache:master Jul 28, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GeoPandas: implement distributed cx and clip APIs

1 participant