-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Summary
PreparedGeometry is missing the Crosses predicate. All other spatial predicates are supported (Intersects, Contains, ContainsProperly, CoveredBy, Covers, Disjoint, Overlaps, Touches, Within).
PreparedGeometry was added in #699.
Background
The underlying JTS prepared geometry implementation delegates Crosses to baseGeom.Crosses(), which calls RelateMatrix() → geom_GeometryRelate_Relate(). When the global isRelateNG flag is false (the default), this code path calls CheckNotGeometryCollection and panics for geometry collection inputs.
The non-prepared geom.Crosses works fine because it goes through Relate() → jtsRelateNG(), which always uses RelateNG and handles geometry collections.
Switching the global isRelateNG flag to true fixes Crosses but introduces a behavioral difference in EqualsTopo for degenerate geometries (e.g. POINT(110 200) vs LINESTRING(110 200, 110 200)), causing an existing xmltest to fail.
Possible approaches
- Set the global
isRelateNGflag and investigate/fix theEqualsTopodiscrepancy for degenerate geometries. - Have the
geompackage call RelateNG directly forCrosses(bypassing the global flag), though this means modifying the JTS transliteration layer.