Share one bounding box accumulator across TWKB sub-writers
まだ誰も着手していません。
評価
調査の方向性
Start with writeGeometryCollection and copytwkbWriter, which create the per-child TWKB writers, then look at writePointArray where each coordinate updates bboxValid, bboxMin and bboxMax. The widenBBox helper comes from PR #720, which is not on master, so confirm that PR's status before starting. Pick one option: share the parent's box state with sub-writers, or move the min/max update into a shared helper. Done means one place maintains the bounding box and the existing TWKB tests still pass.
索引モデルが issue の本文から書いたものです。
説明
This issue assumes that #720 will be merged. It is about widenBBox, which that PR adds and which isn't on master yet. If #720 is closed without merging, this issue can be closed too. Nothing here is externally detectable.
writeGeometryCollection writes each child with its own twkbWriter (from copytwkbWriter), and each writer tracks its own bounding box in bboxValid, bboxMin and bboxMax. #720 adds widenBBox, which merges a child writer's box into the parent's after the child is written. That leaves two places that maintain the box: writePointArray for each coordinate, and widenBBox for each child.
Two ways to bring that back to one place:
- Have
copytwkbWritergive the sub-writer the parent's bounding box state, for example as a pointer to a small struct holding the three fields.writePointArraythen extends the collection's box directly andwidenBBoxcan be deleted. Sub-writers don't write a bounding box, and they use the parent's precision, so the values are already on the same integer scale. - Keep a box per writer and move the min/max update into one helper, such as
extendBBox(d, lo, hi), whichwritePointArraycalls withlo == hiandwidenBBoxcalls with the child's range.
Option 1 removes more code and handles nested collections without a merging step.
- 主要言語
- Go
- スター
- 176
- フォーク
- 27
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
peterstace/simplefeatures のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
peterstace/simplefeatures#726 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
peterstace/simplefeatures#725 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
peterstace/simplefeatures#724 ·
-
bug
難易度 3/5 半日 初心者へのやさしさ 45/100
peterstace/simplefeatures#721 ·
-
jtsport
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
peterstace/simplefeatures#700 ·
peterstace/simplefeatures の issue をすべて見る
似ている issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
DaoCloud/DaoCloud-docs#7839 ·
メンテナーはふだん 1 日以内に返信
-
Type: Enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
projectdiscovery/urlfinder#167 ·
メンテナーはふだん 1 日以内に返信
-
area: import bug go good first issue priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fukubie/StockLlama#69 ·
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cloverworks-hq/rumpty-cli#95 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 10 日以内に返信