タグ転記でも情報源を変更セットに残す - #47
Merged
Merged
Conversation
建物を追加する経路は annotation に dataUsed を付けるが、タグ転記の経路は 付けていなかった。変更セットの source は EditSystem がこの値から組み立てる ため、転記だけで保存すると MLIT_PLATEAU も RapiD_Plateau_JP も source_ref も 付かない。報告の「タグ転記モードで既存の建物を選択してタグだけ追加すると 情報源が揃わない」はこれ。 データセットの引き当ては UiRapidInspector の受け入れ経路と同じ形にした。 catalog に無ければデータセット id そのものを使う。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ご報告ありがとうございます。以下のとおり修正しました!(以下Claudeさん)
Fixes #45
何が起きていたか
タグ転記モードで既存の建物にタグだけ追加して保存すると、変更セットに情報源が付きませんでした。
建物を追加する経路では
MLIT_PLATEAU/RapiD_Plateau_JP/source_refが揃います。原因
変更セットの
sourceは、各編集の annotation に付いたdataUsedから組み立てられます(EditSystemの_gatherSources)。UiRapidInspectorがdataUsed: dataset?.dataUsedを付けますtype/plateauID/entityIDのみで、dataUsedがありませんcommit.jsはdataUsedの値を/plateau/iで判定しているので、値が無いと Plateau を使ったと判断されませんでした。直しかた
転記の annotation に
dataUsedを足しました。データセットの引き当ては受け入れ経路と同じ形にしています(
rapid.datasets.get(datasetID)、catalog に無ければデータセット id そのもの)。実地確認
ローカルの dev server に宇城市の Plateau データ(8,994 件、本番 API から取得)を読み込ませ、実際に転記を実行しました。
転記先の OSM 建物だけは合成です。dev server では OSM の認証が無く実データを引けないためで、それ以外は実際の Plateau データと実際のコードを通しています。
保存パネルそのものは、OSM にログインしないと開けないので確認していません。
テスト
2 件追加しました。実装前に、どちらも
expected undefined to deeply equal [...]で落ちることを確認しています。dataUsedが乗ることbrowser 753 completed / 5 skipped、unit 1209 passed。