Objectifs d’apprentissage
In Module 3 we installed JOSM and began drawing our first points, lines, and shapes. We added presets to these objects to attach information about them. At the end, you were able to draw your own map in JOSM.
Drawing maps was an exercise to learn JOSM and learn how to draw places on the map. But our maps were not accurate, because we had not yet included location. In the past two modules we have examined two tools, GPS and Field Papers, which allow us to collect actual locations of places. These locations are represented by coordinates.
Drawing a real map, that is, a map where all the points, lines and shapes are in their proper location, is no different than drawing the maps we drew previously. But now, we will utilise our GPS points and tracks, and our Field Papers, to draw similar maps at their correct locations on the planet.
In this module we will learn how to edit the map on OpenStreetMap and add our improvements. We’ll learn the basic cycle of mapping on OSM:
- Download data
- Edit and add objects on the map
- Upload changes to OSM
- See the changes on the map!
Let’s begin by exploring a little more in JOSM.
JOSM has many different buttons and panels. We are already familiar with the main window - this is the map window, and it is where most of the action takes place. Here you view, edit, and add to the OSM data.
To the right of the map window are a series of panels, which each do something different. When you first install JOSM several panels are shown by default, such as Layers, Properties and Selection. When you select a point, line or shape in the map window, it is shown in the Selection panel. Information about the object is shown in the Properties panel, and the username of the author of that object is shown in the Authors panel.
On the left side of JOSM, there are several toolbars which consist of many buttons. On the uppermost toolbar are different buttons which change what you can do with your mouse. You are already familiar with the first two, the Select tool and the Draw tool. The other tools make it easier to zoom in, delete an object, draw a shape or create a line that is parallel to another line.
Below these tools are many more buttons. These buttons control what you see on the right side of JOSM. Using these buttons you can open and close the boxes on the right, such as Properties, Selection and Author.
Remember the cycle of editing OSM described in the introduction of this module? Download, edit, save. Before we can edit the map, we must download the existing OSM data in our area.
Each item in this list represents a different source of data that is open in the map window. In the example above, “Data Layer 2” is the OSM data that we want to edit. “Markers” are the waypoints from the GPS, and “30 Juni 2011.gpx” is the track from the GPS. Finally, “Field Papers” is the layer created when we added our Field Paper into JOSM.
Lastly, it’s important to know that you can only edit the layer that is considered “Active” by JOSM. If you are unable to edit the map in your map window, it’s probably because you don’t have the correct layer set as active. Most layers, such as GPS points, Field Papers, and satellite imagery, can’t be edited. The only layers that can be edited are data from OSM, which are usually called “Data Layer 1”.
The next step is to edit the map and add new items. This is not always easy at first, but with practice you will get better and better. Note that you can select tools in JOSM by clicking their buttons in the toolbar, or you can use keys on the keyboard as shortcuts. The shortcut keys are indicated in parentheses below.
Remember that your GPS points and Field Papers don’t automatically go into OSM. You need to add them to the OSM map digitally using the Draw tool. But your points, tracks, and Field Papers can be seen in the background as a guide.
When you draw a point, line or shape, it has a location, but no information about what it is. In other words, we know where it is, but not what it is. Before now, we have been using items from the Presets menu to define what it is. The way OSM knows what an object is is by using tags.
A tag is like a label that you can put on something. For example, if we draw a square, it’s only a square. But then we add multiple tags to it that describe what it is:
- this square is a building
- the name of the building is “Menara Thamrin”
- the building is 32 levels high
We can add as many tags as we want to an object. Tags are saved as pairs of text, called the keys and the values. In OSM, the tags written above would be:
- building = yes
- name = Menara Thamrin
- building:levels = 32
When you select an object in JOSM, you can see all the tags that are attached to it in the Properties panel on the right.
You can add, edit and delete these tags from the Properties panel. The tags are traditionally in English, so if you prefer you can always use the Presets menu to simplify tagging objects. When you add or change tags, such as primary highway versus footpath, the style will change according to the tag.
- Use the Presets menu to open up a form and edit the information, or
- Edit the tags directly in the Properties window on the right.
A common mistake is to tag nodes when you want to apply tags to lines or polygons.
When adding tags to a node, select the node and then add the relevant tags (or use the Presets menu). However, when tagging a line or polygon, it is important to select the line, and NOT the nodes that make up the line.
New users frequently use the JOSM Select tool to draw a box around an object, which causes everything (both the line or shape as well as its nodes) to be selected. Then when tags are applied to the selected objects, they are applied to the nodes as well. To avoid this, be sure to only select lines when you want to add tags to them.
Note
More information about tags and presets can be found in the Intermediate OpenStreetMap Guide Module 4.
After we have made a couple of changes to improve the map, we need to upload those changes to OSM. To save changes, we must be connected to the internet.
After you have uploaded all your changes, you can see the updated map.
Sometimes after you download some OSM data, you may wish to save it so that you can edit it offline, and then upload it later when you have internet access again.
Note
While it is possible to download OSM data, save it, and then upload later when you are connected to the internet, this may cause problems, especially if a lot of time passes between the time you download and the time you upload the changes. If another OSM user edits the same area and the same objects during this time, it may cause conflicts to occur. Try not to let too much time pass between downloading and uploading data.
It can be dizzying to click over and over again between the various tools and menus in JOSM. Fortunately, there are shortcuts for most actions in JOSM with a simple press of the keyboard. Here is a list of commonly used keyboard shortcuts and their associated functions: