jiayuasu opened a new issue, #3271: URL: https://github.com/apache/sedona/issues/3271
## Problem Sedona's distributed GeoPandas layer uses field metadata to distinguish a known CRS from a geometry column whose CRS must be inferred from its embedded SRID. A locally constructed geometry column with `crs=None` currently has no CRS metadata, so it is indistinguishable from a raw distributed geometry column with unknown provenance. Reading `.crs` for such a metadata-free column performs a distributed `ST_SRID(first(...))` aggregation. APIs that inspect both operands' CRS, including binary geometry predicates, can therefore launch two eager Spark actions before returning an otherwise lazy result. In a local Spark benchmark, comparing two CRS-less local operands submitted four Spark jobs before result materialization. Recording authoritative no-CRS metadata reduced that count to zero. The one-time constructor cost increased by approximately 2.3 ms for `GeoSeries` and 4.9 ms for `GeoDataFrame` in a warm one-row benchmark. ## Expected behavior Sedona should represent three distinct states: 1. a known CRS stored as CRS metadata; 2. a known absence of CRS stored as explicit empty CRS metadata; and 3. an unknown raw or legacy distributed geometry column with no CRS metadata, which retains the existing embedded-SRID fallback. The implementation should: - record explicit no-CRS metadata for locally owned `GeoSeries` and `GeoDataFrame` geometry columns; - preserve locally supplied per-column CRS values and synchronize their embedded SRIDs; - propagate authoritative CRS state through `set_geometry`, WKT/WKB and file constructors, copies, selections, and all-null geometry columns; - preserve public `crs=None` without erasing an embedded EWKB SRID; - leave raw Spark and pandas-on-Spark geometry columns without metadata on the existing SRID-inference path; - preserve Series names, indexes, active-geometry selection, and laziness; and - add action-count, metadata propagation, raw-column fallback, and compatibility coverage across supported Spark and GeoPandas versions. ## Performance acceptance - Constructing a binary predicate result from two locally created CRS-less operands should launch no Spark jobs solely for CRS discovery. - Metadata-free raw distributed operands should continue to infer their embedded SRIDs and warn when they differ. - The returned predicate and geometry plans should remain distributed and should not add Python execution nodes. Part of #2230. ## Sedona version 2.0.0-SNAPSHOT ## API type Python / distributed GeoPandas API -- 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]
