Skip to content

Lesson 2: Mapping the City from OpenStreetMap

Planning question: What exists on the ground?

Open In Colab   View on GitHub

Before planning anything new, you need a base map of what is already there. You will download buildings, streets, parks and amenities for Indiranagar and combine them into a layered map.

What you will learn

  • Download any OSM layer by its tags
  • Turn polygons into points with centroids
  • Build a layered figure-ground map
  • Do a quick open-space-per-person check
  • Save all layers to one GeoPackage

Key concepts

  • Tags: OSM describes features with key=value pairs, such as leisure=park
  • Layers: maps are built from the bottom up
  • Data quality: OSM is free but uneven, so always check it

What you will make

A figure-ground map of Indiranagar showing buildings, streets, parks and amenities.

Packages osmnx, geopandas, matplotlib
Data OpenStreetMap
Time 30 to 45 minutes

Try it yourself

The end of the notebook includes these exercises:

  1. Compare Jayanagar with Indiranagar.
  2. Add bus stations or libraries.
  3. Add water bodies with natural=water.

Enjoying the course? Support it with a star on GitHub.


Previous: Lesson 1 | Next: Lesson 3