Table of Contents
  1. Introduction
  2. Correcting a Tag
  3. Querying Named Places and QType
  4. Querying around Named Places
  5. Querying the Closest Thing
  6. Querying the Distance to the Closest Thing
  7. Querying the Distance between Two Places
  8. Finish
Introduction

What is OpenStreetMap?

OpenStreetMap (OSM) is a map of the world that is free for everyone to both use and edit. The map is made up of different elements: nodes, ways (ordered lists of nodes), areas (closed ways) and relations (groups of elements), but they are meaningless without the tags that are added to them.

Image of map containing a bakery and some other map features

For instance, the buildings on the map picture above hold some address information. There is also a node on the left that is tagged as a recycling station. On the top, there are two nodes tagged as trees. And there is a node that is tagged as a bakery. The bakery’s tags include the following:

  • shop=bakery
  • name=Riegler
  • website=https://baeckerei-riegler.de/
  • wheelchair=yes
  • opening_hours=Mo-Fr 05:30-18:00; Sa 06:00-13:00; Su 08:30-11:30,14:00-16:00

You can see that every tag consists of a key (e.g. shop) and a value (e.g. bakery). The meaning of tags is documented in the OpenStreetMap Wiki. For example, the page Key:shop holds information about what is considered a shop and what kinds of shops there are. And the page Tag:shop=bakery holds more detailed information on what is considered a bakery and how to tag it.

What is NLMaps Web?

NLMaps Web aims to provide a way to query information in OpenStreetMap by using plain English. In order to do this, it converts your English (natural language or NL) query into a machine-readable language (MRL) query, which is used to retrieve the queried information from OpenStreetMap and to show it on a map. Here is an example of a simple NL query with its MRL equivalent.

Show me all the supermarkets in New York City!

query(area(keyval('name','New York City')),nwr(keyval('shop','supermarket')),qtype(latlong))

There is also another version of displaying the information contained in the MRL, which is a little more human-readable:

Question ClassThing in Area
Target Tagsshop=supermarket
AreaNew York City
QTypelatlong

NLMaps Web learns to improve when you give it feedback on how it performed. So let’s do that as your first task:

  1. Go to the query page and ask the query below. For this tutorial, please always copy the provided examples and use them exactly as they are.
  2. Check that the question class is “Thing in Area”, the queried tag is “shop=bakery”, the requested area is “Hamburg” and the qtype (the thing you’re asking for) is “count”.
  3. If everything is alright, press the button saying “That’s Correct!” to send your feedack to the server.

How many bakeries are there in Hamburg?

❌ Not completed yet.