Pl:JOSM/Basic editing

From OpenStreetMap Wiki
Jump to: navigation, search
Dostępne języki — JOSM/Basic 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

Ta strona opisuje kilka podstawowych sposobów edycji danych map w JOSM. Najpierw należy pobrać jakieś dane (patrz Pierwsze kroki)



Undo / Discard changes

JOSM generally doesn't read or write data to the OpenStreetMap database except when you ask it to, but at any time before uploading, you can discard all your changes by closing down JOSM (or by deleting the active data layer). You can also undo individual editing actions by clicking the undo toolbar button (JOSM-Icon-undo.png) or by pressing Ctrl+Z. So relax! If you make a mess of your editing at any point, you can always undo a few steps.

(S)elect and (A)dd

There are two main modes of operation when editing:

Objekte auswaehlen.png - (S)elect - for selecting elements, viewing/editing their tags, and moving them.

Setze Knotenpunkt.png - (A)dd - for adding new nodes to create a new way, extend an existing way, or as a standalone node

Because you will be flipping between these modes quite a lot, it's worth remembering the keyboard shortcuts: 'S' and 'A'

You will also need to delete things sometimes (Keyboard shortcut is the 'delete' or 'del' key):

Loesche Knotenpunkt.png - (Del)ete - to delete elements

Adding a way

When creating a way, you need to think about what is currently selected.

  • Clear your current selection by doing 'Edit' menu -> 'Unselect all'. Alternatively put JOSM into select mode (S) and click somewhere in the black background.
  • With nothing selected, press 'A' to begin adding a brand new way.
  • Click somewhere in black background to create a new node.
  • Keep clicking to draw a way with several nodes in it.
  • When you want to stop adding, press 'S' to go back to select mode.

Adding a stand-alone node

To create a standalone node, repeat the same steps above, but this time we'll stop adding after only one node:

  • Clear your current selection
  • Press 'A' to begin adding
  • Double-click to create the node.
  • Press 'S' to go back to select mode.


Panels appear as a strip on the right hand side of the JOSM screen, but you can show & hide each one. Do this by clicking the various buttons in the bottom-left:

layerlist.png propertiesdialog.png selectionlist.png relationlist.png commandstack.png userlist.png history.png conflict.png validator.png filter.png changesetdialog.png mapstyle.png

They are toggle buttons, meaning you can click the same button to show the panel and then hide it and then show it again (try it). On the panels themselves, you have the option to minimise them, or un-pin (undock) a panel to have it as a separate window.

Some panels are more useful than others. You'll definitely want to have the "properties/memberships" panel visible (propertiesdialog.png).


Tags are displayed in a panel called "properties/memberships" in the top-right. When you select an element, its tags will be displayed there in a table with keys on the left, and values on the right. Go into (S)elect mode and try selecting an existing way or node to see its tags. In the areas of existing map data which you downloaded, you should find a lot of tags. Some tags have quite complicated meanings, while others like the 'name' tag, are quite straightforward. Refer to Map Features for tag documentation (worth having a look at, but it's quite a big list. You're not expected to know all of these tags!)

To add a new tag, click the 'Add' button GvSIG Valencia mapping party Tutorial JOSM-add.gif (not to be confused with "(A)dd mode" for adding data elements) -- or you can press the keyboard shortcut Alt+A

To edit an existing tag, double-click on it, or click once to select it and then click the 'edit' button, or you can press the keyboard shortcut Alt+S.

When typing your tag into the key and value boxes, you'll find JOSM snaps to suggested values from a drop-down. This is a time-saving feature based on all keys and values appearing within the downloaded area and all common tags that JOSM knows about.

A note on selecting: When you select elements to modify the tags on, take care to select the right thing. Normally you might only select a single element (a way or a node), but in JOSM you are also able to select multiple elements and apply tags across the entire selection. One approach is to drag a selection box, but for more control over your selections, try holding down the Ctrl key while clicking.

Some nodes have tags on them, while others exist purely for connecting to form ways. Standalone nodes (almost) always have tags on them, meanwhile nodes making up a way may have tags, but often do not. JOSM displays nodes which have tags differently: It either displays an icon which describes the meaning of the tag (e.g. traffic lights) or if JOSM does not recognize the tag combination, the node is drawn as a filled, light blue square.

Adding and adjusting nodes of a way

You can move nodes and ways by selecting them and, while still in (S)elect mode, dragging them. The vast majority of the time you will be interested in moving only one node at a time. Clear your selection before dragging the node. If you accidentally move a whole way use Ctrl-Z to undo.

You can add nodes to the middle of a way by going into (A)dd mode, and clicking on a way segment at the desired place. Return to (S)elect mode afterwards, unless you are building a connecting way. To add another node along this way segment, be sure to clear your selection before adding again. Take care when adding nodes in a situation where lots of ways are nearby (criss-crossing or running in parallel) It's quite easy to accidentally add a new node which bunches together several ways. Undo! The easiest way to avoid this, is to temporarily zoom right in, so that things are spaced out nicely.

There is another trick for adding nodes to an existing way. Look out for the little crosses appearing midway along the segments. You can drag these to quickly add a node without leaving select mode.

Delete a node by selecting it, and pressing Delete key. This will delete the selected objects, but keep you in (S)elect mode.

Splitting and combining ways

splitway.png You can split one long way into two smaller ways. Select the node where the split should occur, and select 'Tools' menu > 'Split Way'. You can do this several times to chop a way in several places. The resulting ways will share the same tags initially, but they are separate ways now. You can give them different tags.

Sometimes you need to do some clever selecting to indicate exactly which split JOSM should perform. If a node is connected to multiple ways, you must select the node and the way that you wish to split. To do this, select the way and then while holding shift, click on the node . Another trick is to select two nodes before clicking 'Split Way'. By doing this, a way can be split at the two different nodes at the same time. This can be a time-saver, but you are actually required to do this when splitting a way which is forming a loop.

combineway.png The opposite kind of operation, is to combine two ways together to form one. You can only do this with two ways which are arranged end-to-end (they are lined up ready to be combined into one way) Select both of the ways at the same time. Again this can be achieved by holding down shift to add to your selection. Click 'Tools' menu > 'Combine Way'. At this point JOSM will create a single way. If the two ways had different tags, then the combined way will share all tags of both. You may be prompted to "solve conflicts" with tags, where the same key is set to different values on the two different ways. Remember tags always apply along the entire length of a way. If you need different tags, you need different ways.

wayflip.png The reverse way action will change the direction of the way. Every way has a direction which is indicated with arrows when the way is selected. As mentioned above, ways must be arranged end-to-end before they can be combined, and this includes pointing in the same direction (although it will prompt you to automatically do a reverse if they are not correctly end-to-end). Often the direction of a way doesn't matter, but it can be used to indicate directional features. Some important examples include:

  • Oneway restrictions with the oneway=yes tag.
  • waterway=river should be pointing the direction of flow (downhill)
  • natural=coastline which must have a direction with land on the left, sea on the right.

You can adjust the topological layout of nodes and ways with many alternative sequences of clicks and keypresses. This can be confusing at first, but you'll master it with a bit a practice. Use Ctrl-Z to undo. Have a play!

Upload data

Remember you can #Undo / Discard changes at any time, but what if you're happy with your changes? It's time to upload the changes to the OpenStreetMap server.

Simply click the upload icon JOSM-Icon Daten upload.jpg

You will be prompted to enter a changeset comment. Write a brief description of what kind of edits you are making. This short comment is recorded along with your changes, and displayed to other people if they are looking through the history displays. It's good to explain why you are making the changes rather than just what you are changing, but don't worry about it too much. A brief comment will suffice.

The first time you upload, you will also be prompted to enter a username and password as registered on the main website (see Creating an Account). Save this to avoid typing it every time, unless you are sharing a computer.

When you upload to OpenStreetMap you agree to release your data contributions under the OpenStreetMap License. Please only contribute data which you are allowed to release (no copying!). Now it's in the OpenStreetMap database, it's free! Your changes will only appear on the map after a delay. It typically takes a few minutes, but can take longer (See Slippy Map#Tile rendering). While you're waiting, why not do some more editing? It's a good idea to upload your editing work quite regularly.

What about conflicts? What if somebody else has been editing in the same area since the time when you downloaded? If you think there is a chance of this (e.g. if you downloaded several hours ago, or if you're editing close to somebody else at a mapping party) then it is good idea to do another download before doing an upload. If new elements have been added, you can review these before uploading. If there is a direct clash with somebody else changing the exact same elements, then JOSM will report "conflicts" and allow you to correct them. Some more details of this are described in JOSM/Advanced editing#Resolving conflicts

Next >>

Once you're familiar with basic editing you might want to learn about some more advanced editing.