15 - Finding ways

Ways are used to describe lines and polygons in the OpenStreetMap database.

Ways are used for roads, paths and the boundaries of buildings and parks.

To query for ways we just use the way keyword instead of the node keyword.

For example, this query extracts all the ways in our bounding box.

It will return the data about those ways. This includes their tags and references to the individual nodes that describe them.

But the IDE won't be able to generate a map for you. And will probably give you a warning about that.

This is because ways don't have their own geometry. Instead they are associated with a collection of nodes that mark out the shape of the way.

You can view the tags for these ways and the ids of the nodes that are members of them via the "Data" tab in the IDE.

In the next query we'll learn how to also extract the nodes for these ways.

Links
Source File15-ways.osm
Authors
  • Leigh Dodds