OSM Managment - smartcommunitylab/smartplanner GitHub Wiki

OpenStreetMap data is a collection of geographically associated facts. a seamless worldwide basemap designed for routing purposes. It is open data, licensed under the Open Data Commons Open Database License (ODbL). In the following section we will explain a brief tutorial to edit osm data using JOSM Editor.

In this tutorial we will take a closer look at the interface of JOSM, and see how we can use it to edit the map on OpenStreetMap

Requirments

In order to run JOSM on your computer you'll need:

  • Java 8 (higher may work). Notes:Often Java is already installed. If not, install Java. You may want to disable the browser plugin, which is not needed for (and even cannot be used with) JOSM, for security reasons). If you currently have an older version of Java installed it is best to upgrade, but the JOSM Software Requirements detail some version compatibility options.
  • 512 MB RAM or more
  • a display resolution of 1024×768 or higher (800×600 won't be much fun) (recommended) a graphic adapter with 2D acceleration turned on is for more speed

Installation

  1. Download the distribution for your system from the following link
http://josm.openstreetmap.de

for options for OSX 10.6 and 10.7.3+

  • Find the JOSM install file on your computer. Double-click it to begin setup.
  • Click ‘OK’, ‘Next’, ‘I Agree’, and ‘Install’. When the installation is complete, click ‘Finish’ to launch JOSM for the first time. Later, when you want to start JOSM, you can do so by clicking on the Start Menu in the lower left corner of your computer, and clicking the program JOSM. You may see a window pop up that asks if you want to update the software. You don’t need to update it since it is new. Press the button that says “Cancel.” If you don’t ever want to see this message again, check the box at the bottom before pressing “Cancel.”
  1. When JOSM starts, it will look something like this:

images/osm1.png

Local OSM Tile Editing Process.

Editing OpenStreetMap with JOSM is similar to editing with the iD editor we saw previously. But because JOSM is a desktop application, it works a little bit differently. The process of editing and adding to OpenStreetMap with JOSM will always be as follows:

  • Download the current map data from OSM
  • Edit it using Satellite Imagery, GPS, Field Papers, and notes as a guide
  • Save changes to OpenStreetMap

The first editing step is to download the data for your region of interest. Remember that you need to do this every time that you want to make changes to the map, because the map is often being updated by other users.

  • Click on “File” in the top left corner of JOSM and click “Download from OSM”. This will open up the download window. You can access this window more simply by clicking on the download button

  • When the download window opens, you should see a map with a pink box drawn on it. If you don’t see the map, click on the tab marked “Slippy map”.

  • The pink box represents the area of the map that we would like to download for editing. Use your mouse to pan and zoom it to an area that you know very well, such as your hometown or neighborhood. The controls are the same as in the JOSM map window. The right mouse button lets you drag the map, and your scroll wheel allows you to zoom in and out. Sometimes if you are working on a notebook computer it can be difficult to scroll in and out. Working in JOSM is much easier if you have a mouse, but most modern notebooks allow you to scroll using the touchpad.

images/osm2.png

  • Draw a box around the area that you want to download. To draw a new box, click on the map, hold your left mouse button down, and drag your mouse to create a box. Release the mouse button to finish drawing the box. When you are satisfied with the size and location of the box, click “Download” at the bottom of the window. JOSM will get the data for this area from OpenStreetMap and open it in your map window for editing.

  • (OPTIONAL) One can also get the up-to-date OSM data extract for the area of ones interest from Geofabrik and Metro Extracts by Mapzen are possible options.

https://download.geofabrik.de/
https://mapzen.com/data/metro-extracts/

The supported formats are .pbf and .osm

Now let’s open up a sample OSM file which we will use to learn the basic ways to draw maps with JOSM. Note that this map is not real, in that it is not a real map of a real place, so we will not save it on OpenStreetMap.

  • Download the osm tile of Trentino region from here:
https://github.com/smartcommunitylab/smartplanner/files/1141861/map-46.0400_11.1200_0.0400_0.0400_0.0010.osm.zip
  • Uzip the file and extract the .osm file. Now let’s open the sample map file in JOSM. Click the “Open” button in the upper left.

  • Find the file 'map-46.0400_11.1200_0.0400_0.0400_0.0010.osm' file. Click on it, and then click “Open”.

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

images/osm3.png

Basic Operations.

  • To move the map left or right, up or down, hold your right mouse button down, and move your mouse.
  • 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.
  • There a different types of objects here. There is a river, a forest, some buildings, several roads, and a couple of shops. To select an object, click on it with your left mouse button.

Edit Street Segment Properties.

  • Select a street and view the associated osm tags on right side panel. images/osm4.png

  • One can add/edit values of osm tags using the properties panel. Note: For details about available osm tags check here

http://wiki.openstreetmap.org/wiki/Tags
  • Save .osm file inside to $OTP_HOME/router folder along with other data files (gtfs, osm, elevation etc) and re build the graph. Start OTP instance with newly build graph to observe the .osm changes in route planning.