JA:JOSM/Plugins/Reverter

From OpenStreetMap Wiki
Jump to navigation Jump to search

リバーター(reverter)はJOSM変更セットの巻き戻しを行うプラグインです。

注意

Revert scripts#Act_responsibly!Automated Editsに記載されている内容はここでも適用されます。 プラグインは、編集合戦や破壊的な行為での使用を目的としていません。

他のユーザーによる変更を元に戻す前にまずは、丁寧な方法で相手に連絡し、返信するのに十分な時間(最低1週間)を置いて下さい。 壊れたデータは簡単に修正できますが、壊れたコミュニティを復元するのはそれほど簡単ではありません。 :)

他のユーザーによる編集の競合を避けるために、早期に元に戻そうとしないでください。 疑わしい場合は、行動する前にメーリングリストで話し合ってください。

"グリーンランドの氷床の真ん中にある「幼児の犠牲の儀式エリア」"を追加するような露骨な破壊行為はすぐに元に戻すことができることに注意してください。

議論されていない自動編集は、待たずにすぐに元に戻すこともできます。 ただし、何かが自動編集ではない可能性がある場合は、元に戻す前に確認してください。


使用方法

Screenshot-JOSM reverter plugin.png
  • JOSMを使用します。
  • reverterプラグインをまだインストールしていない場合は、「編集->設定->プラグイン」を選択し、プラグインのリストの中からreverterプラグインを選択してインストールし、JOSMを再起動します。その後、JOSMに 「データ->変更セットを元に戻す」 のメニューが追加されます。
  • 元に戻すチェンジセットの影響を受ける領域をダウンロードします。 いくつかのオブジェクトを見逃してもこれは問題ではありません。それらは自動的にダウンロードされます。 空のレイヤーから始めることもできます。 ( ファイル->新規レイヤー )
  • 「データ->変更セットを元に戻す」を選択すると右図のようなダイアログが表示されるので、巻き戻しを行う変更セットのidを入力します。もしクリップボードに有効なidまたは変更セットのURLがある場合は、id欄に自動的に値が挿入されます。完全なリバートを行う場合は、オプションはデフォルトの状態として下さい。
    •  ヒント:復帰させたい変更セットによって削除されたウェイがあり、リバータープラグインによるマップデータの最初のダウンロード後に、その検出されたウェイのノードのみが表示される場合は、同じ変更セット番号で2回目の復帰を試みてください。 場合によっては、削除されたウェイ自体がJOSMの画面表示に表示されます。
  • ダイアログの「取り消す」ボタンを押すと変更セットによる変更内容が元に戻されます。元に戻された内容に問題がないかを確認します。
  • データをアップロードします。アップロードのダイアログで変更の内容を再度確認できます。

部分的な巻き戻し

変更セットがほとんどは問題ないが、いくつかのオブジェクトが壊れている場合、部分的な巻き戻しをすることができます。 部分的な巻き戻しには次の2つの方法があります。

  • 上記の変更セット全体を戻す操作をアップロードの前まで行います。巻き戻しを行うオブジェクトを選択し、「ファイル->選択部分をアップロード」でアップロードします。ただし、巻き戻しにオブジェクトの削除が含まれている場合は、それらは選択できません。
  • 最初に巻き戻しを行うオブジェクトをダウンロードし、reverterのダイアログで「選択分だけを戻す」のオプションを選択します。

どちらの場合も、ウェイのジオメトリを復元するには、ウェイとそのノードの 両方を選択する必要があります。 (ウェイはノードIDのリストのみを保存し、それらの位置は保存しないためです。)検索メニュー( Ctrl-F )でselected | child (selected type:way)の検索文字列で検索すると、選択されたすべてのウェイのノードを選択中のアイテムに追加できます。

クリーン/ダーティーな巻き戻し

変更セットが「クリーン」であるとは、その中に他のユーザーなどによる変更がない場合で、そうでない場合は「ダーティー」と言います。 リバータープラグインはクリーン/ダーティーの両方の巻き戻しを処理できます。別のユーザーが変更を加えている場合は、アップロードが失敗し競合が発生します。これらの競合はJOSMの標準の競合ダイアログで解決し、アップロードします。

1回のアップロードで複数の変更セットの巻き戻し

1回のアップロードで複数の変更セットを元に戻すことができます。 複数の変更セットのidを入力するだけで、最新のものから正しい順序で元に戻されます。 (これは高度な使用法であり、何をしているかわからない場合はお勧めしません。 複雑な巻き戻しの処理に関するヘルプとアドバイスについては、Data working groupにお問い合わせください。

競合の解決

How does it work?

The reverter plugin downloads the changeset from the server. It fetches all the objects affected by the changeset. It will not download the current version of the objects, but the version immediately after the changeset to be reverted. Then it automatically modifies the local copy of the objects, such that the changeset is undone. These modifications are tracked by JOSM in the same way it would record your manual edits.

In particular:

  • If the changeset to be reverted added a tag to an existing object, this tag will be removed by the reverter plugin and the object will be internally marked as dirty (and will be part of the list of "modified" objects returned by the JOSM data search tool).
  • If the changeset to be reverted removed or modified a tag to an existing object, this tag will be restored by the reverter plugin and the object will be marked as dirty.
  • If the changeset to be reverted deleted objects, the plugin will undelete it (i.e. remove the deleted flag). The id of the object will stay the same and the history is conserved as is (the object will not be uploadable immediately if its tags, geometry or members are left as is, because the internal version of an undeleted object is still not marked as dirty and the undeleted object is is still not part of the "modified" objects list of the editor).
  • If the changeset to be reverted created any new object (e.g. a duplicate), it will be deleted (this object will internally marked as dirty). In this case you won't have visual feedback on the editor map if they were not already loaded before you use the reverter, or they will no longer be selectable and will disappear from the editor map. (But you can see the deletions to apply in the upload dialog)

You can still cancel this reversion to make selectable and visible again on the editor map any object whose reversion will delete them, by using CTRL+Z (Undo), which instantly applies to every modification made by the reverter (kept in a lited item of the edit history window), and then press CTRL+Y to redo it instantly (this can be useful to compare visually the effect on specific areas or compare tags values before and after the revert, and decide if you'll really upload this revert to the data server.

The upload is not special in any way, it will increase the version of each affected object and the revert process will be visible in the history.

Issues

Please file a bug report, if you have any problems with this Plugin. A "Precondition failed" message from the server should not occur, this would be an error to report. When writing a bug ticket, try to remember the steps you did and note the changeset ids.

Development

Written by User:Upliner

Source code in SVN: https://trac.openstreetmap.org/browser/applications/editors/josm/plugins/reverter

See Also