PreparedGeometry: add Crosses method

Aperta
#700 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
backend, databases

Direzione di ricerca

Start by reading the PreparedGeometry implementation added in #699 and trace its Crosses path through RelateMatrix and RelateNG. Compare the two possible approaches in the issue, including the existing xmltest failure for EqualsTopo on degenerate geometries. Done means prepared Crosses handles geometry collections without changing the established EqualsTopo behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

jtsport

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

  1. Set the global isRelateNG flag and investigate/fix the EqualsTopo discrepancy for degenerate geometries.
  2. Have the geom package call RelateNG directly for Crosses (bypassing the global flag), though this means modifying the JTS transliteration layer.
Lingua principale
Go
Stelle
176
Fork
27
Merge medio
1g 14h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di peterstace/simplefeatures

Tutte le issue di peterstace/simplefeatures

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.