Skip to content

[GH-3196] GeoPandas: Add distributed sampling, point construction, and serialization - #3197

Merged
jiayuasu merged 9 commits into
apache:masterfrom
jiayuasu:feature/geopandas-native-construction
Jul 29, 2026
Merged

[GH-3196] GeoPandas: Add distributed sampling, point construction, and serialization#3197
jiayuasu merged 9 commits into
apache:masterfrom
jiayuasu:feature/geopandas-native-construction

Conversation

@jiayuasu

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 distributed GeoSeries.sample_points support for uniform sampling. Polygon and line sampling use native Sedona and Spark expressions without collecting geometry rows to the driver or using Python UDFs.
  • Add top-level points_from_xy and GeoSeries.from_xy APIs backed by native ST_Point and ST_PointZ expressions, including scalar broadcasting, distributed index alignment, CRS metadata, and native SRID propagation.
  • Add GeoDataFrame.to_wkt and GeoDataFrame.to_wkb, serializing every geometry-typed column in one lazy projection while preserving non-geometry columns and the existing index.
  • Add direct and GeoPandas-parity coverage for scalar and distributed inputs, empty and null geometries, multipart lines, deterministic random seeds, MultiIndex inputs, duplicate labels, CRS, and SRID behavior.
  • Document the new APIs in the English and Chinese GeoPandas tutorials. The WKT documentation also records that native Sedona serialization preserves stored coordinate precision rather than applying Shapely's default six-decimal rounding.

How was this patch tested?

  • Ran the focused GeoPandas construction, sampling, and serialization test suite: 14 passed.
  • Ran all pre-commit hooks against the changed files.
  • Verified Python 3.8 and Python 3.9 syntax compatibility.
  • Built the Spark shaded module with Spark 3.4, Scala 2.12, and GeoTools enabled.

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 29, 2026
@jiayuasu
jiayuasu marked this pull request as ready for review July 29, 2026 06:34
@jiayuasu
jiayuasu merged commit 7a6ba17 into apache:master Jul 29, 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: add distributed sampling, point construction, and geometry serialization

1 participant