Now that you know how to get on the map and got started with the Java OpenStreetMap Editor (JOSM), let’s take it up a notch with advanced mapping techniques. In this post, I will walk through common editing techniques and two features that make JOSM so powerful: keyboard shortcuts and data filters.
Common operations
JOSM provides several useful functions to manipulate features, available in the Tools menu. All tools have a keyboard shortcut to help you map efficiently. To use any of the tools, first select one or more ways or nodes on the map. The type of tool available depends on the type of object selected. To go fast, try to use the keyboard shortcuts right from the start.
The JOSM Tools menu with keyboard shortcuts next to each entry.
Split Way (p
)
Split a way into two, breaking up the way at a node. This is useful if you want to add different attributes on the same way. Use it for instance to give one road different names for different sections of the road.
- Select the way’s node where you’d like to split the way. For instance, where a road name changes.
- In the Tools menu, click
Split Way
or use the keyboard shortcutp
. - Add a different name for each road.
Splitting a way in JOSM.
Combine Way (c
)
Combine two ways that share a node. This is the inverse operation of Split Way
. Use it to combine multiple ways that have the same attributes and share a node.
- Select the ways you want to be combined by holding the
shift
key while clicking on them. - In the Tools menu, click
Combine Way
or use the keyboard shortcutc
.
Note: When you combine ways with different tags, JOSM will warn you, and present an interface to resolve tag conflicts by choosing one value for the new combined way.
Unglue Ways (g
)
When splitting a way you’ll see that the two resulting ways are still connected by a shared node. To entirely detach ways from each other use Unglue Ways
(g
). Consider a scenario where a road is mistakenly connected to another road. Use UnGlue Ways
to detach the two ways and create separate nodes for each one of them.
- Select the node you want to be detached.
- In the Tools menu, click
UnGlue Ways
(g
). - Move one of the two nodes.
Ungluing two ways.
Join Node to Way (j
)
Attach a node to an existing way. This is useful for instance to join a node on a road way to an existing road way to form an intersection. On this note, it is important that intersections of roads are connected in the data model with a node. While it wouldn’t make a difference for a many rendered maps, a routing engine is relying on this information to guide vehicles or pedestrians through the road network.
- Place a node on top of a way.
- In the Tools menu, click
Join Node to Way
(j
)
Joining a node to a way in JOSM: creating an intersection.
Merge nodes (m
)
Merge two nodes. This operation is similar to Join Node to Way
(j
) but instead of attaching a node to a way, it merges two nodes into one. It is useful for instance to merge two nodes of separate road ways to form an intersection.
- Move nodes close to each other
- Select both nodes by clicking on them while pressing the
shift
key - In the Tools menu, click
Merge nodes
(m
)
Merging two nodes to form an intersection.
Good to know
Orthogonalize (Q
)
Often times, real world features have orthogonal footprints. Think of buildings, pools, parking lots, football fields. To ensure that your traced shape is indeed orthogonal, you can use JOSM’s orthogonalize
feature.
- Trace a feature, for instance a building (make sure that the last nodes connects to the first node).
- Select the resulting way.
- In the Tools menu, click
Orthogonalize
(q
)
Creating rectangular shapes in JOSM: orthogonalize.
Create Circle (Shift + O
)
Mapping circular objects is more precise in JOSM. This tool creates a perfect circle over an area. Consider the below scenario where there is a round-about, it is difficult to draw a perfect round-about free hand. This tool eliminates complications in drawing a perfect circle and also reduces the time involved in doing so.
- Draw a line along the diameter of a round feature.
- In the Tools menu, choose
Create Circle
(Shift + O
).
Creating a perfect circle shape in JOSM.
Other tools to try
Simplify Way
(Shift + Y
) to remove excess nodes on a way.Reverse
(R
), to reverse the direction of the way.Align Nodes In Line
(L
) to align all the selected nodes into a straight line.
Customizing keyboard shortcuts
As you edit more, keyboard shortcuts are quicker than clicking through multiple menus and submenus. Check out the full listing of default keyboard shortcuts. You can also customize these shortcuts to meet your specific mapping needs. For instance, try customizing your shortcuts so that you can hit the most important ones with the hand that you don’t use for controlling the mouse.
Custom keyboard shortcut configuration.
To customize shortcuts, open the Preferences dialog box and click on the Keyboard icon on the left-hand side of the window. Restart JOSM to activate any new shortcuts.
Decluttering data with Filters
In densely mapped areas the many layers of overlapping data can get confusing. This will slow you down and it makes mapping error prone. Filters are designed to help you in these situations by disabling or hiding the types of features you’re not working on. To activate filters, Windows > Filter (Alt+Shift+F
).
Filters are a simple and powerful way to keep editing focused.
To create a new filter, click Add
in the Filter panel. To hide all the objects tagged as building, for example, type in the tag name building
as the filter string. Once added, the items matching the criteria will be inactive in the editing window.
By default, inactive features are displayed in a desaturated style. You can hide inactive features by checking the box in the H
column of the filters panel. You can invert the filter by checking the box in the I
column.
A filter is active only if the Filter window is open, and the E
column (for “enabled”) is marked.
Helpful filters
Filter | Description |
---|---|
boundary: | leisure: | landuse: | waterway: | amenity: | natural: | building: | Hides polygons that commonly obstruct editing. |
timestamp:2014-08-15/ | Hides objects younger than August 15, 2014. |
type:node | Hides nodes. |
highway | Show only highways. |
modified | Show only objects modified since last time saving. |
Configuring a filter in JOSM. To know more about the usage of filters have a look at Using Filters in JOSM.
Happy Power Mapping!
Try these new skills with JOSM today and ask any questions or share your power user tips on Twitter. To dive deeper into mapping with JOSM, check out our Mapping with OpenStreetMap guide.