You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "mtcd001-tech (via GitHub)" <gi...@apache.org> on 2026/09/23 21:51:58 UTC
[PR] [GH-2417] Support GeometryCollection inputs in ST_Crosses [sedona]
mtcd001-tech opened a new pull request, #3397:
URL: https://github.com/apache/sedona/pull/3397
## Did you read the Contributor Guide?
Yes, I have read the Contributor Rules and Contributor Development Guide.
## Is this PR related to a ticket?
Closes #2417. The title follows the `[GH-2417]` format.
## What changes were proposed in this PR?
`ST_Crosses` throws for nonempty GeometryCollection inputs. The GeoPandas wrapper avoids the exception by returning null, which is normalized to `False` even when a collection crosses the other geometry.
Use JTS 1.20's existing RelateNG crosses predicate in the shared implementation and both spatial join evaluator overloads. This supports mixed and nested collections with union semantics. Remove the GeoPandas workaround and re-enable its collection parity coverage.
Regression tests cover the reported endpoint case, true and false results, both argument orders, nested and empty collections, union semantics, prepared join inputs, SQL null propagation, and GeoSeries/GeoDataFrame results against GeoPandas. No dependency upgrade is required.
## How was this patch tested?
Verified failing regressions before the fix: Java and join evaluator tests reproduced the GeometryCollection exception; the Python regression returned `False` for all collection inputs instead of the expected crossing results.
After the fix, on Java 17, Spark 3.5.8 and Scala 2.12:
- Common `PredicatesTest` selection: 44 tests passed.
- `SpatialPredicateEvaluatorsTest`: 1 test passed.
- `predicateTestScala` and `predicateJoinTestScala`: 67 tests passed.
- Python GeoSeries collection regression and GeoPandas crosses parity test: 2 tests passed.
- The existing GeoSeries `test_crosses` passed its ordinary geometry/alignment assertions, then failed constructing its M-coordinate input: this Windows environment uses the pure-Python serializer, which raises `Serializing M or ZM geometries requires geomserde_speedup with GEOS 3.12 or newer`. That case could not reach the predicate. Native-extension coverage remains for CI.
- Spark shaded package build, Spotless, Scala style checks, and Black formatting passed.
## Did this PR include necessary documentation updates?
Yes. The ST_Crosses documentation describes GeometryCollection union semantics and empty results.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GH-2417] Support GeometryCollection inputs in ST_Crosses [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on PR #3397:
URL: https://github.com/apache/sedona/pull/3397#issuecomment-5804213604
Thank you!
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GH-2417] Support GeometryCollection inputs in ST_Crosses [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #3397:
URL: https://github.com/apache/sedona/pull/3397
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org