Allow parsing of WKT variants

オープン
#132 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
176
フォーク
27
平均マージ
1日 14時間
マージ済み PR(30日)
4

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

peterstace/simplefeatures のほかの issue

peterstace/simplefeatures の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。