Version 1 (modified by 14 years ago) ( diff ) | ,
---|
Інші мови:
Конфлікт
JOSM керує локальними копіями OSM об’єктів. Josm завантажує їх з файлу чи сервера OSM та зберігає їх у пам’яті. Якщо ви змінюєте об’єкти або додаєте їх на вашу мапу, ви працюєте тільки з копіями об’єктів. Початкові об’єкти лишаються на сервері, звідки їх можуть завантажити інші учасники, а також на сервер можуть бути завантажені зміни інших маперів.
Це означає, що ви не володієте об’єктами з якими зараз працюєте монопольно, ви робите це разом з іншими користувачами. Коли ви обмінюєтесь даними з сервером, ваша версія об’єктів може зіткнутись із чиєюсь версією, що була відіслана на сервер як оновлення. JOSM робить все можливе, щоб приховати ці колізії від вас, але іноді він не в змозі розв’язати відмінності між двома версіями автоматично. В цьому разі він створить конфлікт.
Конфлікт — це різниця між двома версіями об’єкта, які JOSM не розв’язав автоматично.
Кожен шар даних підтримує перелік нерозв’язаних конфліктів у діалозі переліку конфліктів. З цього діалогу ви можете запускати діалог для розв’язання конфліктів.
Розв’язання конфліктів означає, що вам потрібно вибрати між двома версіями об’єкта для кожної відмінності, яку з них ви бажаєте лишити, першу чи другу, іноді цей процес може називатись злиття.
Конфлікти під час завантаження/оновлення
Коли ви завантажуєте об’єкти з сервера OSM у існуючий шар даних, об’єкти з сервера можуть "стикатись" з об’єктами, що вже є в цьому шарі. Часто, JOSM обробляє ці колізії автоматично, але іноді це неможливо. Наприклад:
- Ви завантажили точку з id 1 з сервера, яка має значення теґу name —
"My name"
. - Ви редагуєте цю точку змінюючи теґ name на
"Or is it this name?"
. У той самий час інший користувач теж завантажив точку, із мінив name на"That's the name"
, та відіслав зміни на сервер. - Ви обираєте пункт меню
Файл->Оновити дані. Версія точки, отримана від сервера буде мати теґ name із значенням
"That's the name"
, що конфліктує з вашим"Or is it this name?"
.
JOSM не може розв’язати таку ситуацію автоматично. Він створить конфлікт. Звичайно JOSM показує наступне повідомлення про помилки:
Conflict when uploading
If you upload objects to the OSM server, they might "collide" there with updates provided by other mappers. Sometimes, JOSM can handle these collisions automatically. If, for instance, you try to delete an already deleted object, JOSM will silently skip deleting and won't bother you with an error message. In most cases, though, JOSM can't deal with them automatically. Here's an example:
- You've downloaded a node with id 1 from the server whose name tag is set to
"My name"
. - Another mapper downloads the node with id 1 too, assigns it the name
"That's the name"
, and uploads it. - You change the name to
"Or is it this name?"
and upload to the server. - On the server, your upload collides with the upload from the other mapper.
JOSM can't resolve this automatically. It creates a conflict. Typically JOSM displays an error message as follows:
Conflicts when merging
In JOSM you can merge the objects in one data layer into another data layer. Again, this can lead to "collisions" between different versions of the same objects. If JOSM can't resolve them automatically it creates conflicts too.
Resolving conflicts
Each data layer maintains a list of conflicts which are not resolved yet. You can consult this list in the Conflict List Dialog. For each conflict listed there you can (and should) launch the Conflict Resolution Dialog and resolve it.
Resolving conflicts is important. For instance, you can't upload your updates to the OSM server unless the list of unresolved conflicts is empty.
Technical background
For each change set that affects an object, the server assigns an increasing version number to that object. (This is shown in the history e.g. way 1222.) JOSM remembers the version of the downloaded objects and reports it back to the server on upload. If the server has a higher version number (due to a change by another mapper), it rejects the uploaded change. In this situation JOSM creates a conflict. The version that is called "my" in conflict resolution dialog is the old, downloaded version, but with your local modifications applied. The version that is called "their" is the most current version on the server that is then automatically downloaded from the server.
See also
- Conflict List Dialog - displays the list of conflicts in the current data layer
- Conflict Dialog - you can use the conflict dialog to resolve a conflict
Back to Main Help