Table of Contents
File > Upload to OSM
- In simple words
- Changesets, upload requests, and upload strategies
- Choosing your upload strategy - when and how often to upload
- Uploading data
- Error and Warning messages
- See also
File > Upload to OSM
Upload new, modified, and deleted objects in the current data layer to the server.
Geo data edited in JOSM is only available locally and only usable by the user who entered the data unless the user decides to make it available to the community too. In order to publish data the user has to upload it. Uploading means that the geo data is transferred to a central server run by the OSM community where it is integrated with geo data from other mappers in a central database. It's by uploading data that locally edited geo data both becomes part of the main database and map at osm.org and can be used by other members of the OSM community.
In simple words
- (like online editors like iD or Potlatch) you need to upload your changes to OSM server. Make sure you connected to server :-)
- you may encounter conflicts after you upload changes (in most cases this means you will have to choose what tags to leave on your objects)
- to reduce chance of conflict:
- don't edit data other mappers edit in same time window
- make your downloads-uploads quicker, so there no overlap between your time-window and theirs
- (rough idea) to entirely avoid conflict, don't edit objects with same id and don't alter their parent relations (node-way and way-relation and relation-relation). If you (and other editor) are editing disjoint datasets (https://en.wikipedia.org/wiki/Disjoint_sets), then there won't be conflict at all. Please note that it also means that all parent ways and all parent relations should be respected (which is likely to change).
- (unlike online editors like iD or Potlatch) you don't have to upload immediately (you may Help/Action/Save file manually but Help/Action/AutoSave will further assist you)
- (unlike every other editor?) JOSM will let you upload changes to already opened (but not a closed) changeset (see #Multipleuploadsintoonechangeset). Every open changeset will "close" automatically by http://openstreetmap.org server after 1 hour.
Changesets, upload requests, and upload strategies
Geo data contributed to the OSM server consists of nodes, ways, and relations. Because there are hundreds of mappers publishing their geo data on the OSM server it is important to track who published what data in which context. It would be tedious for mappers to describe why every single node and every single way is published. A more convenient approach is to package a group of related objects and assign the package itself a comment, instead of the individual objects.
The OSM project calls such a package a changeset. A changeset is a collection of related changes (new objects, object modifications, or object deletions) applied to OSM data.
Changesets are different from upload requests. A changeset is a logical grouping of objects, whereas an upload request is a technical grouping for transferring geo data to the central OSM server only. In JOSM we say, that objects are uploaded using upload requests to a changeset. The JOSM Upload Dialog allows aspects of the upload requests and changeset objects to be configured. Some of the settings are compulsory (i.e. the user has to configure them before geo data can be uploaded) but most of them are optional and JOSM works with reasonable default values.
Geo data can be retrieved later via the changeset it was uploaded to, though it can't be retrieved by the upload request used. Changesets have a unique identifier, upload requests have not. For instance, this changeset includes geo data from tracing over orthofotos of the city of Bern, Switzerland. It isn't possible, though, to see the upload requests that were used to fill it.
One upload request into one changeset
In the most simple case there is only one upload request into a changeset:
This is the standard configuration used by JOSM. It is the preferred configuration
- for users uploading the result of converting a few GPS traces to OSM geo data
- for users uploading the result of tracing a few hours over aerial photos
- for users uploading the result of entering local knowledge about street names, points of interests, etc.
Multiple uploads into one changeset
This is an advanced configuration option which most users don't have to enable. It can be useful:
- for users who map using multiple data layer in JOSM and who want to upload the result of their work into one changeset
- for users who are working in longer mapping session. For them it could be safer to upload intermediate results to the server than to upload the result of the complete session only. In the former case they can use multiple uploads into one changeset which helps them to safe their data without fragmenting them up in unrelated changesets.
JOSM still supports to upload each object individually.
Please note that this is a legacy feature. Until recently, this was the only upload option in OSM. Technically, it uses a slightly different approach to communicate with the OSM server. It is still available in JOSM although the OSM server now supports upload requests with up to 50,000 objects. For the casual and normal user it is almost obsolete. In rare cases, it could be useful for power users.
Uploading large datasets into multiple changeset
JOSM also supports uploading large datasets that don't fit into a single changeset.
This is an advanced option which is only useful for power users. They can select this configuration if they have to upload a dataset with more than 50,000 new, modified, or deleted objects.
Choosing your upload strategy - when and how often to upload
There is no simple answer to the question when and how often to upload. You neither should edit the whole day and then upload everything at once nor upload every minute after adding a way.
Here are some rules of thumb:
- Time required to upload: the smaller the upload requests you choose the longer it takes to upload. It takes more time to upload 100 objects using 100 individual upload requests than to upload them in one request containing 100 objects.
- Collisions with other mappers: if you upload 30,000 objects in one request and if the server encounters a problem on the 29,999th object the whole upload is rolled back. The problem has to be fixed first (i.e. by resolving a conflict). The whole 30,000 objects will then have to be uploaded again. On the other hand, if you upload 30,000 objects with 10 requests containing 1,000 objects each and the server encounters a problem on the 29,999th object then you only have to repeat the last upload request for the 29,000th to 30,000th objects. Objects 1-28,999 are already successfully uploaded. If you're mapping in areas where other mappers are active too you should therefore prefer smaller sizes for upload requests.
Launching the Upload Dialog
Checks before the Upload Dialog is displayed
Before the Upload Dialog is displayed, validator is run on all modified [Concepts/Objects objects]. If it finds warnings or errors you'll be presented with a list of them and get the chance to correct the problems and try again or upload anyway. It's not necessary to fix all of that, but please don't go over it easily, especially not the errors.
JOSM also checks for limitations imposed by the OSM server:
- tag names and tag values must be shorter than 255 characters
- ways can't consist of too many nodes
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
Covered in Uploading to OSM.
Running an upload with advanced options
Adding tags to the 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
sourceto 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 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.
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.
- 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.
- upload-412-node-still-in-use.png (31.1 KB) - added by 8 years ago.
- one-changeset-one-upload-request.png (10.8 KB) - added by 7 years ago.
- one-changeset-multiple-upload-request.png (14.8 KB) - added by 7 years ago.
- one-changeset-individual-object-upload-request.png (12.3 KB) - added by 7 years ago.
- multiple-changesets.png (30.3 KB) - added by 7 years ago.
- upload-dialog-screenshot.png (42.5 KB) - added by 7 years ago.
- tags-config-panel-screenshot.png (7.6 KB) - added by 7 years ago.
- changeset-config-panel.png (10.7 KB) - added by 7 years ago.
- advanced-config-panel.png (8.0 KB) - added by 7 years ago.
- large-upload-basic-settings.png (12.3 KB) - added by 7 years ago.
- large-upload-advanced-settings.png (13.7 KB) - added by 7 years ago.
- error-dialog-changeset-closed.png (16.2 KB) - added by 7 years ago.
- error-dialog-changeset-full.png (28.3 KB) - added by 7 years ago.
Download all attachments as: .zip