Pl:JOSM/Zaawansowane edycje

From OpenStreetMap Wiki
Jump to: navigation, search
Dostępne języki — JOSM/Advanced editing
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް
Pierwsze kroki Proste edycje Zaawansowane edycje Wtyczki Skróty klawiszowe

Saving and loading .osm files

For most purposes you'll probably want to stick with downloading data and uploading your changes. When you upload your changes you have effectively "saved" your changes. Better than that, you've made your changes available for other people to see on the map, and to to make further changes to. OpenStreetMap is all about internet collaboration! However JOSM can also work with files on your local filesystem, saving and opening files to/from your local disk. This works much like any other normal desktop application.

Use 'file' menu > 'Save As...' to save data (and your changes) to a file.

Use 'file' menu > 'Open...' to open a previously saved file for editing or uploading.

The JOSM file format is an XML representation OpenStreetMap data in the standard .osm format. JOSM extends this slightly to store details of changes to OpenStreetMap data, that is, any changes which were not uploaded already at the time when the file was saved. This is a powerful feature which means JOSM can be used as an offline editor as follows:

Offline editing

While you have an internet connection...

  • Download an area of the map (can be one or several bounding boxes)
  • Save the data as a .osm file on your local disk.

While you're offline without an internet connection...

  • Open the file
  • Maybe open GPS traces and overlay them on the data (This can also work fine offline)
  • Make changes e.g. add local information you have captured while out surveying
  • Save changes back to file. The file includes information about all your changes including moving and deleting data.

When you're back to an internet connection...

  • Open the file from your disk into JOSM
  • Do "File" menu > "Update Data" to re-download the areas you worked on. Resolve any conflicts (see following section)
  • Click upload to save the changes to the OpenStreetMap server.

Filtered Data

You can filter OpenStreetMap data (e.g. by tags, to give a thematic extract) either by manipulating .osm files on your disk using tools such as osmosis, osmconvert or osmfilter, or by requesting filtered data from a specialised API such as XAPI or Overpass API. You then can load filtered data into JOSM. This can be the best way to get a look at it, but take care when editing. You should not delete or move any nodes without first doing a normal unfiltered download around it, to get all connected elements.

Resolving conflicts

While you are editing with JOSM, there's a chance other people could be editing the same area of data at the same time. JOSM only downloads data when you ask it to, which means you can have quite long editing sessions without necessarily noticing potential clashes with other contributors. In general it's a good idea to upload regularly if you are able to do so, to reduce the chance and also the impact of any conflicts. But it can also be a good idea to download prior to uploading. The download action does not overwrite your changes with data from the server. There's no need to worry about losing any of your changes, but it does mean you have the chance to see any changes which other users may have made (or new data they have added) before you do your upload.

Clearly these changes made by other users are something you should check over prior to uploading. If another user has changed exactly the same element which you have also changed, then JOSM reports a "conflict". At this stage you have not yet uploaded your changes. You are forced to resolve conflicts before you upload. This feature is designed to help you to find areas where you have clashed with other users. It allows you to pick and choose whether to overwrite other people's changes with your own in each case. Once you have resolved the conflicts you can upload your changes.

Konflikte loesen.png
Toggle visibility of the conflict panel on the right. Here the conflicts are listed, and you can open a window to resolve each one. You are given the choice of which version to keep, yours or theirs. Various tabs and displays are designed to help you understand what the data represents in each case. This can seem a little complex and unclear, but it always comes down to the simple choice: keep yours or theirs. "Theirs" refers to the current state of the data on the server, which is a change from the state of the element as it was when you originally downloaded it, i.e. it appears that somebody else has edited this element.

Unglueing and untangling

In the JOSM/Basic editing section we described how to edit nodes and ways, and also operations such as split/combine/and reverse ways. Things can get a little more tricky when data is intertwined, overlapped or tangled in a complex manner, but remember you can always try to make changes and then 'undo' a few steps if things don't work out. You can also temporarily move nodes or even delete elements to understand linkages and overlaps, before undoing to restore the data. Here are a few additional editing techniques:

Overlapping ways, where two or more ways are drawn exactly on top of each other between the same two nodes, this can happen by accident or may be a correct representation of something (Two highways should not normally overlap each other like this, but you may come across landuse areas with nodes shared with the bordering highways for example) In this situation you may need to select one or the other of the overlapping ways. There are various ways of doing this:

  • A middle-click reveals a context menu showing the different tags of all the elements under the mouse.
  • Holding down Ctrl will allow you to click the menu to change the selection.
  • Alternatively repeated middle clicking will cycle through the selection.
  • If you do not have a middle mouse button, hold down the 'Alt' key on the right side of your keyboard and do a repeated left-click to cycle through the selection

Unglue ways is an option on the 'Tools' menu. If two (or more) ways are connected at one node, this option will create a second node, freeing one way from the other. Note that this normally results in a 'duplicate node' (two different nodes sitting exactly on top of one another) with both nodes being selected. As a follow-up, or just to understand the situation, you may want to clear your selection and then drag just the top node off to one side. You should do this to avoid leaving a duplicate node in the data. They are usually regarded as a bad thing, often resulting in confusion and routing connectivity problems. There should be no need for them in the data. The 'unglue ways' action can also be used with a way element selected, to unglue it from any nodes it shares along it's entire length. If you want to merge such nodes together again, use 'Tools' > 'Merge nodes' - but note that this merges all nodes that are very near.

The features described here are particularly useful for working with complex data. There are several other actions on the tools menu, and more can be installed via plugins.


Relations are a type of element which can be used to represent some more advanced kinds of map features and geodata, such as routes and turn restrictions. Elements like "nodes" and "ways" can be members of relations. Relations can be members of relations too (a hierarchy) For each of these memberships the "role" can be named, and the overall relation is given tags. See the Relations page for more details.

JOSM provides an interface to give you raw editing power over relations. There are several ways of accessing the main relations dialog.

Liste aller Relationen.png
The relations panel can be shown on the right-hand side. Toggle visibility by clicking the button on the left. The panel lists all relations in the downloaded area, and provides buttons to create, edit, duplicate, delete, and select a relation.

The "properties/membership" panel, which you normally use to view and edit tags, will also show relations, this time just those of the selected element (the element's memberships).

For creating brand new relations you need to use the relations panel, but both the panels give access to the dialog for editing existing relations. The main relation editing dialogue is split into three areas. At the top you can edit the tags of the relation. At the bottom-left is list of elements which are members, with a column for the roles. The list is ordered (which may or may not be significant) On the bottom-right there is a pick-list of elements. This list is linked to the element selection you currently have in the background data view. Adjust your selection in the background to bring elements onto the list which can then be added to the relation.

Create a new relation

  • In the Relations panel click on the "Create a new relation" button
  • In the "Create new relation" window add the appropriate tags
  • Add relation members and add appropriate roles
  • Click OK to close the "Create new relation" window
  • Video example

Add new members to a relation

  • In the main window select the ways/nodes to be added to the relation
  • Select the required relation from the list of relations in the Relations panel
  • Click on the "Open an editor for the selected relation" button
  • In the "Edit relation" window select the existing member (if present) that the new node/way is next to and click on the appropriate "Add all primitives..." button in the Selection area
  • Click OK to close the "Edit relation" window

JOSM allows you to sort members, and this is recommended for some types of relations. e.g. route relations, multipolygons, .... Sorting the members allows you to ensure the members are connected, and to locate any unconnected ways. To sort the members click the A-Z button in the relation editor.

Official JOSM relation documentation

That's a very brief description of relation editing in JOSM. Refer to the 'Relations' help documentation for a more exhaustive description of these features.

Tagging Presets

JOSM supports distributed tagging presets. This is a XML config file that describes the GUI for entering tags (or properties, annotations, sometimes called map features) available when using the Presets menu in JOSM. The XML files can be placed anywhere in the web or at the users local file system. Presets can be added by the users in JOSM's Preferences under Map Settings on the Tagging Presets tab. After they have been added, the presets (menus or single buttons) can be added to the toolbar in JOSM's Preferences under Toolbar customization.

For more detailed information visit the following links at

There's plenty more ways to use and customize JOSM, with its various JOSM plugins. For additional tips and tricks to use JOSM, see the Advanced Tricks and Tips Page

Next >>