Skip to content

Instantly share code, notes, and snippets.

@jmarlena
Last active August 29, 2015 14:18
Show Gist options
  • Save jmarlena/5f223c9ff65400a0acc6 to your computer and use it in GitHub Desktop.
Save jmarlena/5f223c9ff65400a0acc6 to your computer and use it in GitHub Desktop.
JOSM Guide Script

JOSM Script Guide

JOSM is an editor designed for OpenStreetMap. It is open source and written in Java. This video tutorial will walk you through the basics of installation and getting started. You'll want to use a mouse to make editing easier.

Installation

To install JOSM go to https://josm.openstreetmap.de/.

There are several JOSM installation options. The easiest should be the recommended version which will automatically update itself with Java Web Start software.

To run JOSM you should download Java 7.

Click the link "Launch josm.jnlp (version 7906)"

If you downloaded the reommended version with Java Web Start it will automatically install updates every time you open and run the program. The first screen that pops up will show you which version you're running and the lastest updates. So here we see we're running the latest version and below are some the latest changes.

Uploading Data

Once JOSM is already open and running; we can see two uploading options in the upper left corner: "Open a File" and "Download Map Data from the OSM Server".

Download Map Data from OSM Server

Let's start by clicking the "Download Map Data from OSM Server" button

A new window will pop up and in the left hand corner to get data from OpenStreetMap we will make sure the OpenStreetMap data box is checked. Right below that we have five ways of getting OpenStreetMap or OSM data: We can highlight a part of the OSM map, upload saved data from a bookmark, select an area using latitude and longitude with the Bounding Box option, type a name of an area in "Areas around places" option or select a range of OSM tiles.

If you know the name of the area you want to search around you can try "Areas around places." For example, by typing "Monterey Bay Aquarium" I can search for the area surrounding this place.

To use the slippy map option. We can use left click and drag to select an area, the right mouse button to scroll an area and the wheel or the plus & minus signs to zoom. For example, if I want to zoom into the town of Twin Peaks in the state of Washington in U.S. I will start by zooming in to the Pacific Northwest. If the area I have selected is too large a warning will appear in the right hand corner. When the area highlighted seems small enough this will change to "Download area ok, size probably acceptable to server." So I will zoom in until the area looks small enough and then click download at the buttom of the screen.

Open a File

The other option for downloading map data is to "Open a File." To practice for this tutorial you can download a sample data file at http://learnosm.org/files/sample.osm.

Now let’s open the sample map file in JOSM. Click the “Open” button in the upper left.

Open file

Find the file sample.osm. It is probably in your Downloads folder, unless you saved it somewhere else. Click on it, and then click “Open”.

You should now see a sample map that looks like this:

Sample file

Basic Operations

Map Navigation

To pan or move the map left or right, up or down, hold your right mouse button down, and move your mouse.

Zoom

There are several ways to zoom in and out of the map. If you have a mouse, you can use your scroll wheel to zoom in and out. If you are using a laptop and don’t have a mouse, you can zoom in and out using the scale bar in the upper left of the map window. Drag the bar left and right by holding your left mouse down and moving the bar left or right with your mouse.

Map Objects

Note there are different types of objects on the sample map. Explore by clicking on an object with the left mouse button. You will find a river, forest some buildings, several roads, and a couple of shops.

Nodes, Ways and Closed Ways

As you click different objects on the sample map, notice that there are three different types of objects on the map. There are points, lines, and shapes. In OpenStreetMap (OSM) terms these are called Nodes, Ways and Closed Ways.

Points are Nodes

Points are a single location, represented by symbols. On this sample map, there are two points, a shoe shop and a supermarket. The shoe shop is represented by a shoe symbol, and the market is represented by a shopping cart. In OSM terminology points are called nodes.

Lines are Ways

There are several lines on the map as well, which represent roads. If you look closely you will see that within the lines, there are points as well. These points don’t have any symbols or other information associated with them, but they help to define where the line is located. In OSM terminology lines are called ways.

Shapes are Closed Ways (ways that end at the same point they start)

Lastly, there are numerous shapes on the sample map, representing different places - a forest, a river, a park, and buildings. A shape is used to represent an area, like a field or a building. A shape is exactly like a line - the only difference is that the line begins at the same point where it ends. In OSM terminology shapes are called closed ways because it is just a line that ends at the same point it begins.

Tags

When you select an object, notice that a list appears to the right of the map in a window called “Properties”. These are known as tags. Tags are information that is tied to a node, way or closed way that describes what it is. For instance, they help describe whether our object is a forest, a river, a building, or something else.

Practice Task 1 : Move the Forest

Let's practice moving an object on the map by moving the forest. Select the forest; Be sure to click on the line around the forest, not one of the points on the line. Now hold your left mouse button down and drag your mouse. You should be able to move the forest to a new location on the map.

Click on one of the points on the line around the forest. Hold your left mouse button down and drag your mouse. You should be able to move the point. This is how you can change the shape of an object, or move a point.

Practice Task 2: Draw a Node, Way & Closed Way

On the left side of JOSM the second button down is the drawing tool. Before you draw, you need to make sure that nothing is selected. Click in the black space on the map, where it is empty, to make sure nothing is selected.

Find an empty area on the map, and double-click with your mouse. This will draw a single point. To draw a line, single-click with your mouse. Move your mouse and click again. Continue until you are happy with your line. To end the line, double-click your mouse. Draw a shape the same way that you draw a line, but finish the shape by double-clicking on the point where you started the line.

Saving

You can save your work and keeping practicing but don't upload your changes.

More Practice

Find more practice tasks at the following tutorial links: [insert other practice links here]

Best Practices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment