Use your business data to your advantage with the help of Syncfusion’s new data science offerings. Discover how a custom big data solution can provide your company with valuable predictions about key market trends.

Getting Started with OpenStreetMap

Packt Publishing

Once you’ve learnt OpenStreetMap using this book you’ll be your own cartographer, creating whatever maps you wish easily and accurately, for business or leisure. Best of all there are none of the usual restrictions on use.

Not all the tools and features on the site are obvious from the front page, so we'll go on a tour of the site, and cover some other tools hosted by the project. By the end of the article, you should have a good idea about where to find answers to the questions you have about OpenStreetMap.

A quick tour of the front page

The project's main "shop front" is www.openstreetmap.org. It's the first impression most people get of what OpenStreetMap does, and is designed to be easy to use, rather than show as much information as possible. In the following diagram, you can see the layout of the front page. We'll be referring to many of the features on the front page, so let's have a look at what's there:

Most of the page is taken up by the map viewer, which is nicknamed the slippy map by mappers. This has its own controls, which we'll cover later in the article. Along the top of the map are the navigation tabs, showing most of the data management tools on openstreetmap.org. To the right of these are the user account links.

Down the left-hand side of the page is the sidebar, containing links to the wiki, news blog, merchandise page, and map key. The wiki is covered later in this article. The news blog is www.opengeodata.org, and it's an aggregation of many OSM-related blogs.

The Shop page is a page on the wiki listing various pieces of OpenStreetMap-related merchandise from several sources. Most merchandise generates income for the OpenStreetMap Foundation or a local group.

Clicking on the map key will show the key on the left-hand side of the map. As you'd expect, the key shows what the symbols and shading on the map mean. The key is dynamic, and will change with zoom level and which base layer you're looking at. Not all base layers are supported by the dynamic map key at present.

Below this is the search box. The site search uses two separate engines:

Nominatim: This is an OpenStreetMap search engine or geocoder. This uses the OpenStreetMap database to find features by name, including settlements, streets, and points of interest. Nominatim is usually fast and accurate, but can only find places that have been mapped in OpenStreetMap.

Geonames: This is an external location service that has greater coverage than OpenStreetMap at present, but can sometimes be inaccurate. Geonames contains settlement names and postcodes, but few other features.

Clicking on a result from either search engine will center the map on that result and mark it with an arrow.

Creating your account

To register, go to http://www.openstreetmap.org/, and choose sign up in the top right-hand corner. This will take you to the following registration form:

At present, you only really need an account on openstreetmap.org if you're planning to contribute mapping data to the project. Outside the main site and API, only the forums and issue tracker use the same username and password as openstreetmap.org. You don't need to register to download data, export maps, or subscribe to the mailing lists. Conversely, even if you're not planning to do any mapping, there are still good reasons to register at the site, such as the ability to contact and be contacted by other mappers.

OpenStreetMap doesn't allow truly anonymous editing of data. T he OSM community decided to disallow this in 2007, so that any contributors could be contacted if necessary. If you're worried about privacy, you can register using a pseudonym, and this will be the only identifying information used for your account. Registering with openstreetmap.org requires a valid e-mail address, but this is never disclosed to any other user under any circumstance, unless you choose to do so.

It is possible to change your display name after registration, and this changes it for all current OpenStreetMap data. However, it won't change in any archived data, such as old planet files.

Once you've completed the registration form, you'll receive an e-mail asking you to confirm the registration. Your account won't be active until you click on the link in this e-mail. Once you've activated your account, you can change your settings, as follows:

You can add a short description of yourself if you like, and add a photo of yourself or some other avatar. You can also set your home location by clicking on it in the small slippy map on your settings page. This allows other mappers nearby to see who else is contributing in their area, and allows you to see them. You don't have to use your house or office as your home location; any place that gives a good idea of where you'll be mapping is enough. Adding a location may lead to you being invited to OpenStreetMap-related events in your area, such as mapping parties or social events. If you do add a location, you get a home link in your user navigation on the home page that will take the map view back to that place. You'll also see a map on your user page showing other nearby mappers limited to the nearest 10 users within 50km.

If you know other mappers personally, you can indicate this by adding them as your friend on openstreetmap.org. This is just a convenience to you, and your friends aren't publicly shown on your user page, although anyone you add as a friend will receive an e-mail telling them you've done it.

Once you've completed the account settings, you can view your user page (shown in the following screenshot). You can do this at any time by clicking on your display name in the top right-hand corner. This shows the information about yourself that you've just entered, links to your diary and to add a new diary entry, a list of your edits to OpenStreetMap, your GPS traces, and to your settings. These will be useful once you've done some mapping, and when you need to refer to others' activities on the site.

Every user on openstreetmap.org has a diary that they can use to keep the community informed of what they've been up to. Each diary entry can have a location attached, so you can see where people have been mapping. There's an RSS feed for each diary, and a combined feed for all diary entries. You can find any mapper's diary using the link on their user page, and you can comment on other mappers' diary entries, and they'll get an e-mail notification when you do.

How to use the slippy map

The slippy map is the name used to mean the interactive sliding map viewer used on the front page of openstreetmap.org. It uses an open source JavaScript library called Open Layers, and sets of map tiles that are assembled to form a continuous, movable image. Tiles for different zoom levels show different amounts of detail, depending on the rendering rules used. Apart from being the usual way of showing the map, it's also a tool for mappers to examine the data behind the map.

You can move the map around using the controls in the top left-hand corner of the map, and zoom in and out using the slider. You can also drag the map around with your mouse or pointing device, or zoom in and out using a mouse wheel, if you have one. You can zoom in on a particular area by holding down the Shift key and dragging a rectangle over the area you want to see. Double-clicking on the map will re-center the view and zoom in one level.

On the right-hand side of the map, you'll see a plus sign against a blue background; this is the layer chooser. Click this to expand the box, and you'll see the list of available base layers and overlays. A base layer is the underlying map shown, while an overlay adds detail to whichever base layer you've chosen, and may include an interactive element. You can use any overlay with any base layer, but you'll only be able to interact with the top overlay.

The first two base layers are named after the programs used to render them—Mapnik and Osmarender. These layers are designed to show the amount of detail that OpenStreetMap's data contains, but may not include everything in the database, either for the sake of clarity, or because a class of feature may not be in widespread use yet. In general, you should expect to find common features, such as roads, paths, buildings, waterways, points of interest, and landuse shading on these maps. These layers are continually updated, so changes to the database usually appear within a few minutes, depending on how many mappers are making changes and how many people are viewing the map at the time.

The Cycle map is an example of a specialist rendering of the data, and shows cycle networks overlaid on a map with contour lines. It was one of the first alternative renderings of OpenStreetMap data, and has its own site at http://www.opencyclemap.org/. The Cycle map layer is updated less often than the first two layers, generally once a week.

The final layer, called NoNames, is a maintenance tool for mappers, highlighting any streets in the database without a name, where one would normally be expected. The NoNames layer was created to help mappers see where streets had been added to the database by tracing aerial imagery, which doesn't provide the names of the streets. This is only a guide, and not every road highlighted in this layer will actually have a name. It's updated once a week, so any names you add to the data won't show up straight away.

There are two overlays on the slippy map; the maplint overlay and the data over lay. Maplint shows parts of the map that use undocumented tags or has suspected errors, while the data overlay allows you to see the actual data behind a feature on the map, including any tags attached, when it was last edited and by whom.

At the bottom right-hand corner of the map, there are two hyperlinks, labeled Permalink and Shortlink. Both of these give you a link to your current map view, so you can bookmark it or share it with others. The permalink includes the full co-ordinates of the location, while the shortlink uses a code, and is more compact but less readable. To copy either the permalink or the shortlink, right-click on the link and choose Copy Link Location or your browser's equivalent.

Interacting with the data

Along the top of the slippy map are the navigation tabs for interacting with the data, or getting more information:

The View tab will take you back to the map viewer, and doubles as a permalink for the current view. Clicking on this tab will reload the current view and make an entry in your browser's history. If you want to use your browser's back and forward buttons to switch between locations, you'll need to do this for each place you want to move between.

The Edit tab switches to Potlatch—the online editor for OpenStreetMap.

The History tab shows a list of recent edits in the area you're looking at.

The Edit and History tabs will appear in gray if you're looking at too large an area for those tools to cope with.

The Export tab takes you to the map exporter, where you can get images or data for the current area.

The GPS traces tab take s you to the list of raw GPS tracks that have been uploaded to OpenStreetMap. This is where you'll add your own traces once you've collected them.

The User Diaries tab take s you to a feed of diary entries for all OpenStreetMap contributors. At present, all diary entries are listed, rather than being filtered by location or language. This may change as more capabilities are added to the site.

Project documentation: the wiki

OpenStreetMap's data is stored in a custom-built system, but all the documentation for the project is stored in a separate wiki, using Media Wiki—the software used to run Wikipedia. It's hosted at http://wiki.openstreetmap.org/. In general, any information that isn't part of the map data itself is kept here.

The wiki hasn't been integrated into the login system for openstreetmap.org, so if you want to edit the wiki, you'll need to create a separate account. This isn't necessary if you only want to read the wiki.

You can use the wiki to record any information that you think might be useful to other mappers. This includes definitions of what particular tags mean in OpenStreetMap, details of how well-mapped cities, towns and villages are, instructions for installing and using various software packages, and reviews of GPS receivers.

The wiki should usually be your first resort when looking for the solution to a problem. The easiest way to find information is by using the search box. There's also a customized Google search of the wiki, mailing lists, and forum at http://bit.ly/osmsearch.

The most important and heavily used page on the wiki is Map Features (http://wiki.openstreetmap.org/wiki/Map_Features), for which you'll find a link in the left-hand side navigation. This contains a list of commonly used tags and descriptions of how they should be used. More unusual tags are also documented in the wiki, but you may need to use the search box to find these.

There are no restrictions on what anyone can write in the wiki, and few mappers keep it up-to-date, so some information you find in there may be out-of-date, or may not reflect standard practice by the majority of mappers. If you find a page in the wiki that looks inaccurate, you're welcome to correct it yourself, or ask in another communication channel about its contents. The wiki documents what mappers do, rather than dictating it, so you can choose to ignore its advice if it would prevent you from mapping some area or features properly.

Communicating with other mappers

As OpenStreetMap is a community-run project, you will need to communicate and collaborate with other mappers to get the most out of participating in the project. There are a number of ways you can do this, depending on your personal preferences and the type of information you're looking for (or want to offer).

Mailing lists

The main method of communication between mappers is the mailing lists. There are a large number of mailing lists reflecting the diversity of the OpenStreetMap community and the activities they're interested in. The mailing lists are hosted at http://lists.openstreetmap.org/. You need to be subscribed to any OpenStreetMap mailing list to post a message, and you can subscribe to any list via the web interface, or by sending an e-mail to <listname>-subscribe@ openstreetmap.org. There are five main lists that interest most mappers:

Announce (http://lists.openstreetmap.org/listinfo/announce): Announce is a very low-volume, moderated mailing list where announcements of significant changes to OpenStreetMap are announced. You should subscribe to this list if you aren't planning to use any of the other mailing lists.

Talk (http://lists.openstreetmap.org/listinfo/talk): Talk is for general discussion of OpenStreetMap, and is a very high-volume list. It's where most issues affecting OSM are discussed, and the discussions can be lengthy and heated sometimes. If you want to make a significant announcement, or get the attention of a large part of the OpenStreetMap community, use this list.

Newbies (http://lists.openstreetmap.org/listinfo/newbies): Newbies is a mailing list for newcomers to OpenStreetMap, where you can ask simple questions. It's a lower-volume list than talk, so you won't get overwhelmed with mail by subscribing.

Dev (http://lists.openstreetmap.org/listinfo/dev): Dev is where programmers writing the software that OSM runs on, and those writing the software that uses OpenStreetMap data hang out. You can use this list to discuss bugs you've found in the website or any software, but not for questions on mapping and tagging. Some OpenStreetMap software packages have their own development mailing list.

Legal-talk (http://lists.openstreetmap.org/listinfo/legal-talk): Legal-talk is where licensing and copyright issues affecting the project are discussed. If you have data from an existing source you'd like to import to OpenStreetMap, this is where you should ask if the data is compatible with OpenStreetMap's license.

There are also local mailing lists for many countries, and for specific regions of some countries. You should consider joining your local list, as many country-specific tagging schemes exist, and these lists have a lower level of traffic than the main talk list.

Some specialist subject mailing lists also exist, covering particular aspects of using OpenStreetMap data, such as routing, accessibility, and geocoding. If you would like another specialist mailing list (and are prepared to operate it), you can request its creation by e-mailing the mailing lists administrator. See the mailing lists page on the wiki (http://wiki.openstreetmap.org/wiki/Mailing_lists) to find out who currently does this job.

Chatting on IRC

The best place to get live help from other mappers is on Internet Relay Chat (IRC). While there's no "official" OpenStreetMap IRC server run by the project, the most popular channel is at irc://irc.oftc.net/osm, and there are many country-specific IRC channels also hosted on irc.oftc.net.

See the Contact page on the wiki (http://wiki.openstreetmap.org/wiki/Contact) for a list of channels. Just like the mailing lists, the main IRC channel can get very busy and the discussion heated, but any sensible question will normally get a sensible answer. The main channel is busiest and most useful during European working hours.

Forums

There is a web forum for OpenStreetMap at http://forum.openstreetmap.org/, where you can get in touch with other mappers. The forum isn't as heavily used as the mailing lists or IRC channels, so here you may have to wait longer to get an answer to your questions.

planet.openstreetmap.org

If you need OpenStreetMap data in bulk, you will need to download a dump of the database, known as a planet file. All planet files are hosted on http://planet.openstreetmap.org/, including the weekly full dump, the daily, hourly, and minute-by-minute change, or diff files.

There's no user interface to this site, only the raw directory listings. The latest weekly planet file is always at http://planet.openstreetmap.org/planet-latest.osm.bz2, and in each subdirectory containing diff files, there is a text file, timestamp.txt, which contains the timestamp of the most recent diff.

If you don't need data for the entire planet, you can trim down the planet file to a particular geographical area, and some sites provide pre-built extracts, covering particular countries or continents.

Reporting problems with OpenStreetMap software

OpenStreetMap's developers use an issue tracking system called Trac, hosted at http://trac.openstreetmap.org/, to manage bugs in the core OpenStreetMap software, such as the API and websites. You can report the bugs you find here, but only for software. Any problems with the map data itself should be reported elsewhere. Trac uses the same username and password as the website.

OpenStreetMap on social networks

Unsurprisingly, many mappers and users of OpenStreetMap also use various social networking sites, and have created a presence for OSM there. Social networking sites are particularly useful when organizing OpenStreetMap-related events.

Don't be afraid to ask

OpenStreetMap is built on community. If you have a problem, are unsure about how or whether you should map something, or need help using the maps in some way, use one of the methods we've covered in this article to ask someone. Experienced mappers would rather help you than have inadvertent mistakes in the data, or worse, have you give up mapping altogether.

Summary

OpenStreetMap is a collaborative project, and uses many different resources to allow mappers to communicate with each other. We've looked at most of these in this article, including:

The main openstreetmap.org website

The OpenStreetMap wiki

Mailing lists

IRC channels

The web forum

The issue tracker

Whenever you encounter a problem with creating, editing, or using OpenStreetMap data, you should always ask other mappers for guidance, as there may already be an answer, or the problem may be affecting more mappers. Choose which channel suits your personal preferences.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.