Allow parsing of WKT variants

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

Start by locating the WKT recursive descent parser and its grammar rules; the issue does not name files or tests. Compare how it handles the separate POINT and Z tokens with the single POINTZ variant, then check the project’s parser tests. Done means the parser accepts the described Z and M variants while continuing to accept the standard token form.

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

Descrizione

algorithm good first issue improve

There are variant WKTs for Z and M geometries that are invalid according to the official WKT grammar. These variants are parsed successfully by PostGIS, so we should parse them successfully as well. This follows the Robustness Principle.

For example, the token stream POINTZ ( 1 2 3 ) is invalid according to the official grammar. This is because POINT and Z should be separate tokens (i.e. the token stream POINT Z ( 1 2 3 ) is valid according to the official grammar, and we already accept it). We wish to also accept the token stream variant containing POINTZ as a single token.

PostGIS might accept POINTZ because it's building tokens in a slightly different way (and can split single words into multiple tokens based on pre-defined boundaries). Or maybe it's just allowing POINTZ by altering the grammar it accepts. The exact method that PostGIS uses doesn't actually matter too much for our purposes, since it's the behavior that's important.

Modifying our WKT tokenizer to split POINTZ into two tokens (POINT and Z) seems a bit complicated though. I think we should leave the WKT tokenizer the same, but modify the grammar used by the recursive descent parser to accept the variant grammar instead.

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.