Purpose
In this lab, you will download real building location data from OpenStreetMap (OSM) using Overpass Turbo, export it as CSV, and clean it using a provided C++ tool. This cleaned data will be used in later labs that focus on algorithm design, not wireless engineering.
This is not RF engineering. We intentionally ignore walls, interference, attenuation, and signal strength. Buildings are treated as simple geometric points. The goal is to practice algorithms on realistic, messy data.
What You Are Preparing
You are producing a file of demand points:
- Each building → one point
- Each point has coordinates in meters
- Later labs will place Wi-Fi access points to cover these points
This preprocessing step is intentionally separated from the algorithmic work.
Step 1: Run an Overpass Turbo Query
Go to: https://overpass-turbo.eu
Paste the following query into the left panel:
[out:csv(::type,::id,name,building,"addr:housenumber","addr:street",::lat,::lon; true; ",")][timeout:90];
{{geocodeArea:Kenyon College}}->.a;
(
way["building"](area.a);
relation["building"](area.a);
);
out center;
Then click Run.
What this query does
- Finds the OpenStreetMap area for Kenyon College
- Extracts all objects tagged
building=* - Outputs one row per building
out center;converts building polygons into a single point
Step 2: Export as CSV (Important)
Overpass Turbo does not provide a traditional “CSV download” button. Follow these steps exactly:
- After the query finishes, click the Data tab (top right)
- You should see output starting with: @type,@id,name,building,addr:housenumber,addr:street,@lat,@lon
- Select all text and copy
- Paste into a new file named: kenyon.csv
If your header does not include @lat and @lon, your query is incorrect.
Step 3: Clean and Normalize the Data
You will use a provided C++ tool called osm_wifi_prep (from the GitHub Classroom starter repository).
This tool:
- Reads the raw Overpass CSV
- Filters usable building rows
- Converts latitude/longitude to a local meter-scale coordinate system
Build
make
Run
./osm_wifi_prep kenyon.csv kenyonout.csv
Output format
id,name,lat,lon,x_m,y_m way:322703800,Mather Hall,40.3789,-82.3957,61.1248,454.442 ...
lat, lonare original OSM valuesx_m, y_mare coordinates in meters
Common Issues
“No usable rows found”
- Cause: missing latitude/longitude columns
- Fix: confirm
out center;is in the query
Unnamed buildings
- Many OSM buildings lack names
- The tool uses the OSM ID as a fallback
- This is acceptable for the lab
Extra buildings outside campus
- OSM boundaries are imperfect
- This realism is intentional
What You Should Observe
- The data is real and messy
- Input validation matters
- Algorithm results depend on preprocessing choices
Keep kenyonout.csv. You will use it directly in the next assignment.
