Task - Explore Landuse#

In this module, we’ve learned how to reproject data between coordinate reference systems (CRSs) and to calculate areas and distances.

Now let’s explore land use in a neighborhood or city of your choice using OpenStreetMap data.

Survey - Self Assesment#

Before starting the task, please complete a short self-assessment survey (under 2 minutes) to see what you’ve learned in this module. It’s identical to the survey you took before.

The survey is supposed to be shown below if not, click here to take the survey

Suggested Workflow#

Step 0: Import libraries#

Don’t forget to import libraries you will use

import osmnx as ox
#more libraries here ...

Step 1: Choose an area of interest#

  • Define a city, district, or neighborhood you want to analyze

#example
area_name = "Leopoldstadt, Vienna, Austria"

Step 2: Download data from OSM using OSMnx#

  • Use ox.geocode_to_gdf() to get the boundary of your area (you dont need it for getting the landuse features, but it might be useful to check if the name of the area is geocoded correctly)

  • Use ox.features_from_place() to retrieve land use features

  • For getting landuse features you need to define tags which are based on keys and values of the features - you can find the definition for then here.

area = ox.geocode_to_gdf(area_name)

area.explore(tiles='cartodbpositron')
Make this Notebook Trusted to load map: File -> Trust Notebook

Once you’ve confirmed the area is correct, you can download the land-use data.

tags = {‘landuse’: True}

landuse = ox.features_from_place(area_name, tags)

Step 3: Inspect the Data#

Before diving into analysis, it’s important to understand what’s in the dataset.
Let’s take a closer look at the structure and contents of the downloaded OSM data.

Here are some key things to check:

Geometry types

  • Does the dataset contain only polygons? Or are there also points or lines?

  • If you’re only analyzing land use areas, you’ll likely want to keep only polygons.

Coordinate Reference System (CRS)

  • What CRS is the data using? (e.g., EPSG:4326)

Attribute fields and tags

  • What columns are available?

  • Are the landuse tags stored in a column like "landuse" or "tags"?

  • Print .columns, inspect .head(), or use .info() to explore the table.

Unique values in key fields

  • What land use types are represented? (gdf["landuse"].unique() can help.)

#your code is here

Step 4: Clean the data#

Filter the dataset to keep only relevant land use features and polygon geometries.

# Keep only Polygon and MultiPolygon geometries
#landuse_poly = ...

Step 5: Reproject the Data#

Reproject the dataset to an suitable UTM zone

#landuse_poly_utm = ...

Step 6: Calculate areas by land use type#

Compute polygon areas in a metric CRS (UTM) and aggregate them by the landuse attribute.

Export both absolute areas and their proportional shares (% of the total area).

# landuse_poly_utm['area'] = ...
# summary = landuse_utm.groupby('landuse')['area'].sum()

Step 7: Visualize the results#

Plot the land-use polygons with different colors, and produce bar charts or pie charts showing the absolute and relative areas of each category.

#your code is here

Step 8: Saving to file (optional)#

If you want you can save the landuse data woith calculated are atrribute to file to continue working with it later

#landuse_poly_utm.to_file("path_to_file/osm_landuse.gpkg")

Step 9: Explore and Reflect#

Take a closer look at the resulting land use map for your chosen area.

Ask yourself:

  • Does the map look complete and accurate?

  • Are all major land use types (residential, industrial, parks, etc.) represented?

  • Are there missing areas or unexpected gaps in the data?

  • If you’re familiar with the city or neighborhood — does the map match reality? Are certain areas mislabeled, outdated, or missing?

  • Which land-use type(s) dominate? What does that say about the area?

You can also compare your results with official planning maps if available.

This step is important not only for validating your data, but also for building your critical thinking as a spatial analyst.