|↑ OpenStreetmap Hacker's guide||↑↑ Net & Web|
Other docs -- Map features -- JOSM
This is a topic on which there is much more documentation than about other topics, presumably because it involves a transfer of information to rather than from OSM.
The OpenStreetmap wiki also contains more information on contributing than on any other topic. There is an introduction to contributing, for example, and many pages on special topics that will be referenced in the following.
The important thing when building a collaborative data base like OpenStreetmap is that different contributors attach the same meaning to the same metadata. Otherwise map feature with the same appearance will mean different things in different places.
The central wiki page to consult is the very long page about map features. It lists (almost) everything that can be included in the database and links to many specialised pages that describe more specific attributes for most features. Read it at least partly before making your first contribution!
Basics -- Editing paths -- GPS imports
There are two different generations of web interfaces for editing the OpenStreetmap database, but for serious contributors, JOSM is the way to go: With it you can import track data, save and load unfinished work locally.
The features of JOSM are well documented both in a wiki of its own and in pages on the OpenStreetmap wiki. If I understand correctly, it is still under development, and some menu items do not work yet, but it is certainly quite useful and efficient to work with. A minor quibble is that its Java GUI does not play well with X11 window managers, with windows losing focus for no reason, but still accepting input.
A basic JOSM editing session goes as follows:
JOSM provides several functions to make working with paths (ways) easier. They are located in the Tools menu. Here are some of their applications:
The easiest and most accurate way to survey new roads and other paths is by travelling on the road and recording a GPS track. JOSM somewhat supports this workflow. I will first describe JOSM usage and then the necessary preprocessing.
JOSM allows to open multiple OpenStreetmap XML files with File → Open which become several layers. A sub-window on the right shows all layers (enable or disable with Windows → Layers). A newly opened layer will be on top and selected for editing, indicated by the green tick mark next to it. Using Edit → Merge layer, you add its contents to the main map data (or any other layer you choose). You can then edit it further, add tags and upload it as described above. Note that merging layers cannot be reversed with the Edit → Undo function, so you may want to save to disk beforehand if you have already made some edits.
This functionality of JOSM works only with OpenStreetmap XML files. Though it can also open other file types, they cannot be merged and edited, so you would have to retrace them by hand (the most braindead kind of data conversion). For the GPS survey workflow to make sense, you have to convert your GPS tracks to OSM format. It is also advantageous to split the recorded track up into sections if you have been tracing multiple roads.
Theoretically, the tool GPSBabel is supposed to do that. It has never worked for me: I have encountered empty output, crashes, and tracks with a single point only, but never managed to convert a complete path. YMMV, so just try it out. The following paragraphs describe my workflow with the GPS logger I own, which leaves much scope for custom processing and will also be suitable for other devices with some modifications.
GPS surveying for OpenStreetmap with the Wintec WPL-2000 logger
The fun starts with obtaining the GPS data from the logger, as it is stored in a proprietary format and the enclosed software of course discriminates against free operating systems. With help from the information here, I have written a small Perl script that converts the binary data into a white space separated table of numbers. This generic output format allows to display and process it using general-purpose tools like gnuplot, awk or simple custom programs. The first column is the latitude; you will have to tell a generic plot program to use it for the vertical coordinate if you want a map-like display. My data extraction program puts any markers (if present) into the last column of the table. A new paragraph is started when the marker indicates that the logger was switched on or a new track was started.
GPS tracks can zig-zag a lot, especially when the fix is not perfect, such as in narrow valleys and dense forests. I sometimes use this Perl script to smooth the track. It reads from stdin or its file argument and writes to stdout. You may have to adapt it to your preferences, so have a look at the source if the results are not to your liking.
Finally the white space separated navigation data have to be converted to the OpenStreetmap XML format for JOSM. I have another Perl script for that here. (Perl is the most productive programming language I know, and is especially suitable for text processing.) Then one proceeds to merge the new path as described above.
[Aside: There is also a script for converting white space separated navigation data to KML format for Google Earth.]
Licensed under the Creative Commons Attribution-Share Alike 3.0 Germany License
TOS / Impressum