wiki:Ru:Help/Action/Upload

Version 9 (modified by Takuto, 9 years ago) ( diff )

промежуточная версия перевода

Translation incomplete

Другие языки:

Загрузка на сервер OSM

Геоданные, введенные в JOSM (или результаты редактирования существующих данных) доступны только локально и могут быть использованы лишь тем пользователем, который их ввел, пока этот пользователь не решит сделать эти данные доступными также и для других членов сообщества. Для того, чтобы опубликовать данные, пользователь должен "выгрузить", передать их на сервер. "Выгрузка" означает, что геоданные передаются на центральный сервер, управляемый сообществом OSM, где эти данные объединяются с данными других картографов в централизованной базе данных. Именно в результате передачи на сервер введенные или отредактированные локально данные становятся частью общедоступной карты, а также могут быть использованы другими членами сообщества OSM.

Пожалуйста, будьте внимательны и осторожны при редактировании и передаче данных на сервер. Если есть какие-то сомнения в правильности данных, лучше воздержитесь от передачи этих данных на сервер, сохраните их локально на диске, чтобы позже проверить их еще раз.

Пакеты правок, запросы на загрузку, и стратегии загрузки

Геоданные, загружаемые на сервер OSM, состоят из точек, линий и отношений. Редактированием карты занимаются сотни мапперов, поэтому важно отслеживать, кто загрузил конкретные данные и в каком контексте. Было бы очень трудоемко описывать источник каждой линии и каждой точки, поэтому группы логически связанных объектов объединяются в пакеты, которым и присваивается описание

В проекте ОСМ каждая такая группа называется пакетом правок. Пакет правок это набор связанных изменений (добавлений, изменений или удалений объектов) применяемый к данным ОСМ.

Пакеты правок отличаются от запросов на загрузку. Пакет правок это логическое объединение объектов, тогда как запрос на загрузку это техническое объединение для передачи геоданных на сервер ОСМ. Терминологии JOSM объекты загружаются на сервер с помощью запросов на загрузку в пакет правок. Диалог загрузки данных JOSM позволяет настраивать параметры запросов на загрузку и пакетов правок. Некоторые из параметров обязательные (т.е пользователь должен настроить чтобы загрузить геоданные), но большинство не требуют настройки и JOSM нормально работает со значениями по умолчанию.

Загруженные геоданные впоследствии возможно получить с сервера запросив их по номеру пакета правок, а вот запросы на загрузку так использовать нельзя. У пакетов правок есть уникальный номер, в отличии от запросов на загрузку. К примеру, этот пакет правок состоит из гео данных полученных трассировкой ортофотоснимков города Берн, Швейцария. Узнать составляющие этот пакет запросы на загрузку невозможно.

Один запрос на загрузку в один пакет правок

В наиболее простом случае пакет правок состоит из единственного запроса на загрузку:

Это стандартная конфигурация, используемая редактором JOSM. Она лучше всего подходит для

  • загрузки результатов обработки нескольких GPS треков
  • загрузки результатов пары часов трассировки спутниковых снимков
  • добавления информации о точках интереса, названий улиц и других данных, известных пользователю

Несколько запросов в одном пакете правок

Это более продвинутый вариант настройки, не нужный большинству пользователей. Однако, он может быть полезен при:

  • редактировании данных в нескольких слоях данных, если пользователь хочет отправить изменения из разных слоев в один пакет правок
  • длительной работе с картой. Для усидчивых пользователей может быть более безопасно загружать промежуточные результаты на сервер, нежели ждать завершения всей работы. В этом случае они могут сделать несколько запросов на загрузку, чтобы не дробить правки его на несвязанные пакеты.

Так же JOSM пока поддерживает загрузку каждого объекта отдельным запросом.

Пожалуйста, помните что это устаревшая возможность. До недавнего времени это был единственный режим загрузки данных в ОСМ. С технической точки зрения, он использует немного другой способ работы с ОСМ сервером. Этот вариант все еще не удален из редактора, хотя сервер ОСМ теперь способен загружать запросы объемом до 50,000 объектов. Для обычных пользователей загрузка отдельным запросом фактически бесполезна, и может потребоваться лишь в редких случаях продвинутым пользователям.

Загрузка больших объемов данных в несколько пакетов правок

JOSM умеет загружать большие объемы данных, не помещающиеся в один набор правок.

Это расширенная возможность, полезная продвинутым пользователям, которые желают загрузить пакет правок содержащий более 50,000 изменений.

Выбор стратегии загрузки - когда и как часто

Простого ответа на эти вопросы нет. Не стоит редактировать день напролет, и лишь ночью загружать изменения, так же как не стоит отправлять на сервер изменения после каждой добавленной линии.

Несколько полезных правил для выбора стратегии:

  • Загрузка требует времени: чем меньший размер запроса на загрузку вы выбрали, тем дольше будет загрузка. Время на загрузку 100 объектов при загрузке индивидуальными запросами больше чем одним, содержащим 100 объектов.
  • Конфликты с другими мапперами: если вы загружаете 30,000 объектов одним запросом, а сервер обнаруживает конфликт на 29,999 объекте, весь запрос будет отвергнут. Затем вам придется разрешить конфликт, и снова загрузить все 30,000 объектов. С другой стороны, если 30,000 объектов загружается 30 запросами по 1000 объектов каждый, то, в случае коллизии на 29,999-ом, после исправлений нужно будет загрузить только последнюю 1000 объектов. Предыдущие 29,000 уже на сервере. Если вы работаете над областью, где активны другие пользователи, лучше выбрать меньший размер запроса на загрузку.

Загрузка данных

Диалоговое окно Передать данные на сервер

  • Сочетание клавиш: Ctrl+Shift+↑
  • Пункт меню Файл->source:trunk/images/upload.png Передать данные на сервер
  • Кнопка на панели инструментов source:trunk/images/upload.png

Проверки перед отображением диалога

Перед тем, как отобразится диалог передачи данных, все измененные объекты проверяются валидатором, который покажет вам список обнаруженных ошибок и предупреждений. У вас будет выбор - вернуться в редактор для исправления ошибок, либо все равно попытаться выгрузить данные. Проверки JOSM зачастую избыточны, но не игнорируйте их не глядя, по крайней мере попытайтесь исправить ошибки.

Редактор так же проверяет ограничения данных, накладываемые сервером ОСМ:

  • имена и значения ключей должны быть короче 255 символов
  • количество точек в линии ограничено

If the objects you're uploading have cyclic dependencies (relation 1 refers to relation 2, relation 2 refers to relation 3, relation 3 refers to relation 1) JOSM can't upload them. JOSM will ask you to break up these dependencies first.

Note: On large datasets these checks can take some time and for the time being they don't provide user feedback. Please be patient if it takes a couple of seconds to launch the Upload Dialog on large datasets. This will be fixed soon.

The Upload Dialog

The upload dialog consists of two sections:

  • the upper half displays a summary of the objects to be added, to be modified, and to be deleted on the server
  • the lower part provides panels for configuring various aspects of the upload process

When the Upload Dialog is launched it always displays the basic configuration panel which includes a text box for entering an upload comment and a summary of the other upload parameters for this upload.

Running a simple upload

  1. Launch the Upload Dialog
  2. Enter an upload comment. You must provide an upload comment of at least 3 characters.
  3. Click on source:trunk/images/upload.png Upload Changes

Running an upload with advanced options

Adding tags to the changeset

Geo data uploaded to the OSM server is always uploaded to a changeset. Similar to nodes, ways, and relations one can assign tags to a changeset.

In the Upload Dialog one can enter tags in the Tag Configuration Panel, see screenshot below:

Do's and Don'ts

  • Tags are your friends. Use them to describe the geo data you are uploading to the OSM server.
  • Use the tag source to describe the source of your geo data (examples: traced from Yahoo Imagery, based on GPS traces and surveyed by bike).
  • You don't have to add your user name to the tags. The link between the changeset and your OSM user account is maintained automatically.

Note that the required upload comment is also a tag. You can either enter it in the Tag Configuration Panel with the key comment or in the Basic Settings Panel in the text input field provided there.

Choosing the changeset to upload to

In the Changeset Configuration Panel you can select what changeset the data is uploaded to, see the screenshot below:

JOSM uploads to a new changeset if Upload to a new changeset is selected. This is the standard setting. If you want to upload to an existing changeset you have to select one of the available changesets from the drop down list. This list is only enabled if there are open changesets which you can upload data to because you own them. Click on source:trunk/images/dialogs/refresh.png Refresh to load the list of available open changesets from the server. If there is at least one open changeset available you can select the radio button Upload to an existing changeset and select a changeset. Сlick on source:trunk/images/closechangeset.png Close Changeset to close the currently selected open changeset. This is for convenience only. You don't have to close a changeset here in order to run a successful upload. After a successful upload JOSM can either close the changeset used or leave it open for another upload. The default setting is to close it. You can configure whether JOSM should leave it open by unselecting the checkbox Close changeset after upload.

Configuring the number and size of upload requests

JOSM uploads geo data with one or more upload requests to a changeset on the OSM server. In the Advanced Configuration Panel you can decide about the number and the size of upload requests, see screenshot:

Select Upload data in one request to upload all object in one request. If you're uploading a medium to large number of objects this might take some time and JOSM will not be able to inform you about the progress. There are only two outcomes of such an upload: the upload either succeeded or it didn't. In the former case everything is fine, in the later no objects at all have been uploaded. This kind of upload will never lead to a partial upload which is both its strength and its weakness. It can be its weakness if the entire upload fails because there is a problem in the very last object in the upload request.

Select Upload data in chunks of objects to upload the objects in a sequence of requests with a predefined size. You can enter a preferred size for an upload request (called the "chunk size"). Depending on its value JOSM will submit a number of upload requests (the number is displayed on the right of the input field for the "chunk size"). In contrast to the former option, every upload of a chunk can either succeed or fail. You will get some coarse grained progress feedback because JOSM will inform you when an individual chunk has been uploaded successfully or when its upload has failed. Uploading in chunks is in most cases slower than uploading in one requests, though.

Select Upload each object individually to upload each object with an individual upload request. You will get very fine grained progress feedback because JOSM will inform you when an individual object was uploaded successfully or when its upload has failed. Note that this option is in most cases the slowest option.

Recommendations

  • For small (<1,000 objects) to medium upload sizes (<5,000 objects), choose Upload data in one request
  • For medium to large upload sizes (> 5,000 objects) choose Upload data in chunks of objects. A chunk size of 1,000 is a good value to start with.
  • Don't use Upload each object individually unless you have a specific reason to do so. This is basically a legacy strategy from former versions of the OSM server.

Running a very large upload

An upload is considered to be very large if its size exceeds the maximum size of a changeset on the OSM server. Currently, the upper limit for the size of a changeset is 50,000 objects and if JOSM detects that your upload is bigger it displays the following information in the Upload Dialog:

The warning message indicates that JOSM can't upload the data unless you configure some advanced settings. Either switch to the tab Advanced or click on the link in the message. The following configuration panel will be displayed:

For very large uploads, uploading in one request isn't possible and the respective option is therefore disabled. Please select a chunk size to be used in the upload. It has to be smaller than 50,000, too, because the upper limit for the size of a changeset also applies to the chunk size. You can upload a very large dataset with an individual request per object but you're not recommended to do so.

A very large upload doesn't fit within a single changeset. Please select

  • whether JOSM should automatically open as many new changesets as required to upload the data. Select this option if you want to run a very large upload without user intervention.
  • whether JOSM should fill up one changeset and return to the Upload Dialog. Select this option if you want to have full control over the changesets created for the upload.

Error and Warning messages

Uploading to a closed changeset

If you upload to an open changeset, the upload may fail because the changeset has been closed in the meantime. It could have been closed by the server because of a timeout (changesets don't stay open for more than 24 hours and are also closed after an hour of inactivity) or because you closed it explicitly in another JOSM instance.

JOSM displays the following error message:

How to resolve

  • Launch the Upload Dialog again
  • Select another open changeset or select to upload to a new changeset
  • Upload again

Changeset becomes full during upload

There is an upper limit for the size of changesets. On the OSM server it's currently set to 50,000 objects per changeset. An upload may exceed this limit while uploading, mainly if you are uploading a sequence of upload requests to the same changeset.

If JOSM detects that a changeset became full it displays the following warning message:

How to resolve

  • Click on Continue Uploading to continue the upload with as many new changesets as necessary.
  • Click on Go back to Upload Dialog to go back to the upload dialog. There you can select another changeset to upload the remaining objects to.
  • Click on Abort to abort uploading and return to the main map editing interface.

Deleting nodes that are still in use

If your upload includes a deleted node the OSM server checks if the node is still used in one of the ways known to the server. You have to make sure that the node is isolated (not part of any way and not referred to by any relation) before it can be deleted.

If the OSM server detects that the node is still in use it replies an error message which JOSM displays as follows:

If you click on Prepare conflict resolution JOSM supports you in resolving the issue. First it downloads all ways in which the node is still used and merges them with your current dataset. In most cases, JOSM removes the deleted node from all parent ways automatically. If for some reason this isn't possible, JOSM creates a conflict which you have to resolve manually.

After that, just upload again. Your upload now includes all parent ways of the deleted node and the deleted node is removed from all of them. The upload should therefore succeed.

See also


Back to Menu File
Назад на Основную страницу Справки

Note: See TracWiki for help on using the wiki.