Skip to content

[GH-3252] GeoPandas: align GeoDataFrame compatibility APIs - #3253

Merged
jiayuasu merged 3 commits into
apache:masterfrom
jiayuasu:feature/geopandas-compatibility-cleanup
Aug 14, 2026
Merged

[GH-3252] GeoPandas: align GeoDataFrame compatibility APIs#3253
jiayuasu merged 3 commits into
apache:masterfrom
jiayuasu:feature/geopandas-compatibility-cleanup

Conversation

@jiayuasu

@jiayuasu jiayuasu commented Aug 12, 2026

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

  • Yes, and the PR name follows the format [GH-XXX] my subject.

Closes #3252.
Part of #2230.

What changes were proposed in this PR?

  • Add GeoDataFrame.estimate_utm_crs by delegating to the active distributed geometry column. Bounds are computed with one distributed aggregation; only the four aggregate values are materialized on the driver.
  • Align GeoDataFrame.set_crs and GeoSeries.set_crs with GeoPandas:
    • accept the epsg keyword on GeoDataFrame;
    • default allow_override to False;
    • return the mutated object for inplace=True;
    • keep direct .crs assignment as an explicit override.
  • Preserve Sedona's former positional GeoDataFrame.set_crs(crs, inplace, allow_override) calls through a FutureWarning deprecation path, including validation for ambiguous positional and keyword combinations.
  • Fix GeoDataFrame.from_arrow to pass to_pandas_kwargs as one named dictionary on GeoPandas 1.1+, omit it on the GeoPandas 1.0 default path, and raise a clear error when the option is requested on GeoPandas 1.0.
  • Consolidate GeoSeries.total_bounds into one Spark aggregation and cache CRS resolution during UTM estimation.
  • Resolve public CRS return annotations and remove obsolete set_crs overloads and comments.
  • Document the allow_override=False migration under the Sedona 2.0.0 breaking changes and correct the English and Chinese GeoPandas tutorials to assign CRS only when GeoParquet metadata is absent.

How was this patch tested?

  • Full GeoSeries and GeoPandas parity modules against a fresh Sedona 2.0 shaded jar and native geometry serializer: 394 passed, 1 skipped.
  • Full GeoDataFrame test module: 50 passed.
  • Focused compatibility matrix on GeoPandas 1.0.1: 7 passed.
  • Focused compatibility matrix on GeoPandas 1.1.3: 7 passed.
  • Regression coverage verifies normal, empty, and all-empty total_bounds results and exactly one Spark aggregation per call.
  • All repository commit hooks passed, including Black, pyupgrade, Bandit, codespell, markdownlint, and license checks.
  • git diff --check and Python 3.8 syntax validation passed.

Did this PR include necessary documentation updates?

  • Yes, I used the current SNAPSHOT version, v2.0.0.
  • Yes, I updated the affected API docstrings, the English and Chinese GeoPandas tutorials, and the Sedona 2.0.0 breaking-change notes.

@jiayuasu jiayuasu added this to the sedona-2.0.0 milestone Aug 14, 2026
@jiayuasu
jiayuasu marked this pull request as ready for review August 14, 2026 02:28
@jiayuasu
jiayuasu merged commit f9d2945 into apache:master Aug 14, 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: close small GeoDataFrame compatibility gaps

1 participant