Skip to content

[GH-3051] Implement distributed GeoPandas translate#3152

Merged
jiayuasu merged 2 commits into
apache:masterfrom
jiayuasu:feature/geopandas-translate
Jul 24, 2026
Merged

[GH-3051] Implement distributed GeoPandas translate#3152
jiayuasu merged 2 commits into
apache:masterfrom
jiayuasu:feature/geopandas-translate

Conversation

@jiayuasu

@jiayuasu jiayuasu commented Jul 23, 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?

  • Add GeoSeries.translate(xoff, yoff, zoff) and GeoDataFrame active-geometry delegation.
  • Execute translations as native distributed ST_Translate Spark expressions without driver collection or Python row UDFs.
  • Validate operation-wide offsets as numeric scalars and reject array-like, per-row, and distributed inputs.
  • Preserve 2D/3D dimensionality, index, CRS, SRID, nulls, and typed empty geometries.
  • Document JTS/Shapely differences for mixed-dimensional collections, M/ZM ordinates, NaN Z values, and non-finite offsets.
  • Add direct and GeoPandas parity coverage across geometry families, dimensionality, metadata, delegation, and invalid inputs.
  • Build on Implement GeoSeries.translate gauravbyte/sedona#1 while preserving Gaurav Chaudhari’s original commit and authorship.

How was this patch tested?

  • python -m pytest tests/geopandas/test_geoseries.py tests/geopandas/test_match_geopandas_series.py -k translate -q — 12 passed.
  • Repository formatting, lint, security, and license hooks passed for all four changed files.

Did this PR include necessary documentation updates?

  • Yes. The new public API includes parameter descriptions, an example, dimensionality behavior, and engine-compatibility notes in the API docstring.

gauravbyte and others added 2 commits July 23, 2026 00:28
Wire GeoPandas translate(xoff, yoff, zoff) to ST_Translate so GeoSeries
and GeoDataFrame can shift geometries along X/Y/Z. Offsets are cast to
float to satisfy ST_Translate's argument validation. Contributes to apache#2230.

(cherry picked from commit 97e7175)
Normalize operation-wide offsets with the shared affine scalar validation and document the distributed semantics. Expand parity coverage for dimensions, geometry families, metadata, empties, nulls, and invalid inputs.
@jiayuasu jiayuasu added this to the sedona-1.9.1 milestone Jul 24, 2026
@jiayuasu
jiayuasu marked this pull request as ready for review July 24, 2026 05:29
@jiayuasu jiayuasu closed this Jul 24, 2026
@jiayuasu jiayuasu reopened this Jul 24, 2026
@jiayuasu
jiayuasu merged commit 4206eac into apache:master Jul 24, 2026
26 of 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 GeoSeries.translate

2 participants