jiayuasu opened a new issue, #3273:
URL: https://github.com/apache/sedona/issues/3273
Part of #2230.
GeoPandas 1.1 added `GeoSeries.is_valid_coverage` and
`GeoSeries.invalid_coverage_edges` for validating polygonal coverages. A
valid coverage has
non-overlapping polygon interiors and exactly edge-matched shared
boundaries; callers may also
request detection of gaps up to a specified width.
Sedona already depends on JTS 1.20, which provides
`CoveragePolygonValidator`, but validating an
entire distributed GeoSeries cannot be implemented by collecting every
polygon into one task.
The implementation should:
- add a focused native Spark primitive that validates one target geometry
against an explicit
array of neighboring geometries;
- assign a fresh operation-scoped row identifier so duplicate and MultiIndex
rows remain distinct;
- discover candidate neighbors with a distributed spatial self-join using
the target envelope
expanded by `gap_width`, matching JTS coverage-index semantics;
- aggregate only each target's spatial neighbors and run JTS validation on
the executors;
- return one invalid-edge geometry per original row while preserving its
index, order, CRS, and
output naming;
- reduce the distributed invalid-edge result to one Python boolean for
`is_valid_coverage`;
- preserve GeoPandas behavior for valid coverages, overlaps, edge
mismatches, duplicate polygons,
narrow gaps, holes, multipolygons, empty sources, null/empty/non-polygonal
values, and numeric
`gap_width` edge cases; and
- avoid Python UDFs, global geometry collection, and driver materialization
of geometry rows.
The work should be split into two reviewable changes: the native per-target
Spark primitive first,
followed by the distributed GeoPandas APIs and parity/plan coverage.
--
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]