OSM's data is made from the following elements:
- Nodes: The dots that are used to mark specific locations (such as a post box). Two or more nodes are used to draw line segments.
- Ways: A list of nodes, displayed as connected line segments. They are used to create roads, paths, etc.
- Closed Ways: Closed ways are ways that go in a complete loop. They are used to create "areas," such as parks, lakes, islands or buildings.
- Relations: When ways are linked but do not represent the same physical thing, a relation is used to describe the role of each way. Relations are used to create map features. such as cycling routes, turn restrictions and areas that are not contiguous. A long way, such as an interstate or a state highway with multiple segments, should be grouped into a relation for that highway. Another example is a national park with several locations that are separate from each other. These also should be grouped into a relation.
(1)node (2)way (3)closed way. All these elements can carry tags, describing name, type of road etc.
You have a choice of three main editors:
- Potlatch This is an older Flash-based editor also available directly from the 'edit' tab.
- JOSM This one is more powerful than the in-browser editors and is preferred by many experienced contributors, but needs to be downloaded separately and takes a bit more effort to get started with.
General tips for adding roads or other ways
- The length of a way-segment can vary greatly. If a road is extremely curvy then it needs a lot of segments/nodes. If it's dead straight, with no adjoining ways, then 1 segment is sufficient for the entire distance, however long. Note the straight bit in Fig.1 at the center of the way requires only one segment.
- If there are multiple tracks you should put the way down the center of them all, as in Fig.3, Image 1. But the following should be considered:
- If one of the routes was done on foot or bike, and the others in a car, it is likely that the slower means of transport have given more accurate data as the GPS has had plenty of time to get signals. It's best to rely on this data being more accurate.
- Data from within a short period of a GPS being turned on is more likely to be less accurate.
- GPX data is far from a perfect drawing of the path. If the dots are all over the place, draw a smooth way down the center (in Fig.3, Image 2 is incorrect, Image 3 is correct. The average route has been drawn cleanly down the centre). It helps to remember what the road looked like when you are gathering the data, so that you can make better choices about how the road shape really looks. If in doubt, get multiple GPS tracks for the same road and average between those.
- When editing and creating dual carriageways, you should try and keep the nodes and segments parallel and aligned, as in Fig.4, Image 1. If one of the carriageways curves off then nodes don't need to be wasted on the straight carriageway, as in Image 2.
- When connecting two roads together they must both link to a shared node. Fig.5, Image 1. A common beginners error is to overlap 2 ways and presume a connection, Fig.5, Image 2, or place nodes very close to one another, but not form a connection Fig.5, Image 3. Neither of these 2 last techniques work. To make a connection when drawing a way, just click on the way, or node, you wish to connect to. Using the short cuts 'n' or 'a', and then clicking on a node or way, will stem a new way from that point. To check if you have done it correctly, shift a node and then undo, if both ways move, it is correct.
- Q: Where are my arrows, I just have lines?
- A: In JOSM, go to Edit, Preference and then Display Settings and click to draw Direction Arrows.
- Q: One of my way-segments has arrows at both ends, is that correct?
- A: If there are arrows at both ends, then either 2 ways overlap and use the same nodes, or the way goes back on itself. The way may have been created when inserting nodes into the way, when not deselecting before the next insert.
Potlatch, the Online Editor
Potlatch is an editor for OSM data. It is recommended for beginners. To use it, you first must sign in or register (see the top right of the Potlatch screen for the "log in" and "sign up" links). Then, to start, navigate to a map location on www.openstreetmap.org and click on the 'Edit' tab along the top of the screen.
There are several places to get help about using Potlatch:
- It is important to allow data to load, before presuming it isn't there. A relatively common mistake is to duplicate data by adding, before it's clear what's already been added.
- Be sure to check if something is where it is for a reason before shifting it to a seemingly better location.
- At the bottom left of the editing page, the centre bottom button allows you to view GPS data. Shortcut 'G'.
- Shift-click anywhere on a way to add a node.
- Click on a way, then click on any node on the way to select that node. You can now move it by simply dragging it.
- Shift-click on a node to start a new way. This is helpful for joining roads.
- To delete a node, select the way, then select a node as above, then press DELETE.
- To copy attributes from a previously-selected way, press 'R'. This is good for adding speed limits to a way that someone else has added previously, e.g. "maxspeed=60".
- To extend a way, select this way, click the node at the end from which you would like to extend, then click for each node to go ahead with the route of the way. Set new nodes or snap to a node of an existing way by moving over the node (it will be highlighted blue). To finish a way, press ENTER. Repeat the attributes from the previously-selected way as described above.
- Select a node to drag it. Save the changes as described above.
- Pressing D will allow you to see GPS traces more clearly.
JOSM is a java-based map editor. Also beginners can use it.
Downloading Data Into JOSM
Before you start to edit by JOSM, you need to download OSM data and GPS traces from OSM database into the application:
- Click File -> Download from OSM menu
- Navigate to the area you wish to edit, by using:
- Mouse wheel: zoom in/out
- Right click and drag: move the map
- Left click and drag: mark the area to download
- At the top of the download window choose what to download:
- OpenStreetMap Data: OSM map data, you will edit this, so you will certainly need this.
- Raw GPS Data: Data gathered from GPSs by OSM users. It's recommended to download all GPS tracks for more accurate drawing.
- Click Download
Important: JOSM will hatch the area outside the downloaded area. Never edit on the hatched area, because it may already contain the objects you wish to draw.
If you press the "Download from OSM" menu later, it will select the currently viewed area automatically, so you can easily download adjoining parts of the map. Don't worry, this will not affect your already edited objects and it will not duplicate already downloaded OSM objects.
You can open your own GPS tracks using the File -> Open... menu (.gpx format). But it is recommended to download other users' GPS tracks too, for better accuracy.
- Q: What user name and password does JOSM require?
- A: The e-mail address and password that you registered as OSM account (not of the wiki). It is advised that you do not use an important password as data is sent unencrypted to OSM. To use encrypted secure authentication, try OAuth (Edit -> Preferences -> Connection settings).
How to create your first basic road in JOSM
Note: Colours may be different as JOSM allows you to change the display colours
Note: Colours link to the coloured text in the instructions
- 1. Use the Create tool and click to place nodes. Way-segments will link the nodes (shortcut = 'a').
- * To create just nodes press Esc after every added node to unselect all and hold down Ctrl while clicking at the next position.
- * To create a way leading on from another way or from a node, select the node (shortcut = 's'), then create (shortcut = 'a').
- 2. Move the way around, or move individual nodes by selecting them first, so it's where you want it (shortcut = 's').
- 3. Tag the way with the appropriate tag for its type. Tags are added in the Properties section (Opens in side bar; alt-p). The Properties section lists current tags within the current selection. The way should change colour to indicate when it is tagged.