Mapping with JOSM
This guide will get you started mapping with the Java OpenStreetMap editor (JOSM) - a powerful and popular desktop editor for OpenStreetMap. Another popular editor is iD, commonly used for short and simple, browser based editing sessions. Note that this section only focuses on the mechanics of editing with JOSM.
Downloading from OpenStreetMap
To start editing, download an area from OpenStreetMap by using the green down-arrow button on the left in the menu bar.
You will routinely use imagery for mapping. JOSM comes with a variety of pre-configured satellite imagery layers - the Bing and Mapbox layers being the most popular ones. Bing and Mapbox may have different levels of detail and clarity in different places, so often worth checking both. Simply select one of them from the imagery menu and you’re ready to go.
When using imagery, keep in mind that imagery may be offset. That is, due to complexities in processing satellite imagery, features on imagery may not be at the same location as they are in the real world. For reference, check existing features on the map and compare them with the imagery or download GPS tracks. To download GPS tracks from OpenStreetMap, check the “Raw GPS” box in the download dialog. If you observe an offset in the imagery, you can correct for it by selecting the “New offset” item in the “Imagery” menu.
Click the “Draw nodes” button to enter the data creation mode. Subsequent clicks on the map will set nodes connected by a way. Double click to finish drawing the way. For drawing single nodes, simply double click on the map. To draw a closed way, finish a way with a click on the first node you drew.
Click the “Select” button to select existing nodes or ways. To move nodes or ways click on them, hold the mouse button pressed and drag them. Then release the mouse button where you’d like to drop them.
To delete data, use the
del key of your keyboard or on a mac, use
If you ever make a mistake,
command+Z on mac, will undo the last change.
Ways can be connected to each other. In JOSM speak, you can glue, unglue, split and combine them. This is useful to create logical connections, for instance between roads of different type. To prevent ways from connecting when drawing, say when drawing a road close to buildings, hold the
ctrl key, while clicking the mouse.
You can add, modify or delete tags directly in the tagging panel in JOSM’s side bar. If for some reason this panel is not visible, you can enabled it under the “Windows” menu. The example below tags two ways at the same time. Simply hold shift to select multiple objects.
Presets are common tags or tagging combinations that can be applied to objects. They can be found in the “Presets” menu where they are organized into logical categories. Try adding a preset and then review the modifications in the tagging panel.
** Copy & pasting tags **
You can copy and paste tags from one object to another. Just select one object, copying with
ctr + c. Then select the other object and paste with
ctrl + shift + v. This will copy only tags - not the geometry.
Uploading to OpenStreetMap
To upload the data, click on the green up-arrow button on the left in the menu bar. This will automatically trigger validation. Review all validation warnings and resolve all errors before you upload. If there are any errors or warnings, do your best to fix them. Before you upload, add a proper changeset comment and specify what source you used. This is important as it will show other users who see your changesets what this changeset was intended to modify and from where you took the information.
The upload will take a few seconds. The data is live on OpenStreetMap immediately. The map usually takes a couple of minutes to clear through all caches.
Once you uploaded the data, you and everyone else can see a corresponding entry on your OpenStreetMap user profile under “My Edits”:
Here are some of the most common filter selectors in use for editing:
boundary: | leisure: | landuse: | waterway: | amenity: | natural: | building:
Pull out common highway classifications into toolbar
When you work on OpenStreetMap, you will use highway classifications a lot, bring them all into the toolbar:
Use keyboard shortcuts
When you’re editing, you will be a lot faster using keyboard short cuts. Take a moment to familiarize yourself with them and start using them! You can find keyboard shortcuts in the menus like in the screenshot below, but there’s also a full reference of keyboard shortcuts on the JOSM web site (en español).
There are many JOSM plugins that will help you to map faster. Here are a couple that used most commonly. You find all plugins in the settings panel:
For tracing buildings, always use the buildings plugin. It speeds up editing by creating rectangular boxes with a tag
building=yes by default. To quickly draw buildings that are aligned to each other, draw the first building, select it, and draw subsequent parallel buildings.
To align existing buildings neatly, you can select multiple buildings, then two extra nodes to set the alignment axis and orthoganalize shape (keyboard shortcut
This plugin makes it really easy to add turn restrictions such as “no left turn” to roads.
Read more in JOSM help - https://josm.openstreetmap.de/wiki/Help/Plugin/TurnRestrictions
Fast draw plugin
This plugin is great for tracing areas like forests, lakes, waterways or landuse and linear features like roads.
To start, press
shift + f, then click with the mouse to start drawing. Whenever you’d like to set a node, press the space bar. For free hand drawing, keep the space bar or mouse button pressed.
To delete the latest created nodes, just hit
To determine how many nodes are set automatically in freehand mode, use the up and down arrow keys.
To finish drawing, press enter to go into the simplification mode (feature will turn yellow), press the up or down arrow for the desired level of simplification and press enter again to create the way.
While tracing you can press
Q to set some preferences for “FastDraw”
Utilsplugin2 comes with a series of tools that you can all find in the new menu “More tools”, after the plugin is installed. The most used one is “Add nodes at Intersections” which gives you a fast way to add nodes at places where ways intersect in the current selection.
Notes are a great way to post questions for others on the map. When mapping, observe notes that others left in the area and if you have a specific question or a suggestion on how the map could be improved, consider leaving a note.
Activate the notes plugin:
Now you should see a list of notes in the side bar for the area you’re mapping in:
JOSM automatically validates your data when uploading, but you can run validation at any point by clicking ‘Validation’ in the Validation panel.
Configuring drawing styles
Sometimes it’s useful to tweak drawing stiles to help improve visibility of certain features.
For example, if you’re working with addresses, activate “Address Tags Validator”:
Or if you’d like to see clearly what you’ve edited in your session, activate “Modified objects”:
Try different drawing styles yourself and figure out which ones help you do your work better.
Highlight data freshness
You can use this style to highlight features that are created or modified in 2016. To configure this:
You can also add custom imagery from Tile Map Service (TMS) or Web Map Service (WMS) endpoints. Here is how:
- Adding a TMS imagery endpoint
- Adding a WMS imagery endpoint
If you upload a change to OpenStreetMap and someone has changed one of the same features in the meantime, a conflict will occur. In this case OpenStreetMap will refuse your changes. Follow these steps to resolve the conflicts:
- Download new data from OpenStreetMap for the area in which the conflict occured.
- Run validation and review the conflicts.
- Fix them.
- Attempt upload again.
As a last resort, you can attempt to upload changes one by one. This is not recommended though.
You can script JOSM to automate certain workflows. For example:
- Expand abbreviations (US): https://gist.github.com/Rub21/feb83f57a727ac0d8a34
- Capitalize names and eliminate “name=S/N”: https://gist.github.com/Rub21/47838797856566a8b6ba
- Expand abbreviations (Peru): https://gist.github.com/Rub21/cc055320c925c855926e
Further reading and questions
For further information, take a look at the JOSM help.