0
0
Drone Programmingprogramming~30 mins

Surveying and mapping with photogrammetry in Drone Programming - Mini Project: Build & Apply

Choose your learning style9 modes available
Surveying and Mapping with Photogrammetry
📖 Scenario: You are working with a drone to survey a small area for mapping purposes. The drone takes photos at specific GPS coordinates. You want to organize these photos and prepare data for photogrammetry processing.
🎯 Goal: Create a program that stores GPS coordinates with photo IDs, sets a minimum number of photos required for mapping, filters the photos that meet this requirement, and finally prints the list of valid photo IDs for photogrammetry.
📋 What You'll Learn
Create a dictionary with photo IDs as keys and GPS coordinates as values
Create a variable for the minimum number of photos required
Filter the dictionary to keep only photos with valid GPS coordinates
Print the list of valid photo IDs
💡 Why This Matters
🌍 Real World
Drones capture many photos during a survey. Organizing and filtering these photos by GPS data helps prepare accurate maps and 3D models.
💼 Career
Surveyors, GIS specialists, and drone operators use similar programming skills to automate data processing for mapping projects.
Progress0 / 4 steps
1
Create the photo data dictionary
Create a dictionary called photos with these exact entries: 'photo1': (34.05, -118.25), 'photo2': (34.06, -118.26), 'photo3': (34.07, -118.27), 'photo4': None, 'photo5': (34.08, -118.28)
Drone Programming
Need a hint?

Use a dictionary with photo IDs as keys and tuples for GPS coordinates. Use None for missing coordinates.

2
Set the minimum photos required
Create a variable called min_photos and set it to 3 to represent the minimum number of photos required for mapping
Drone Programming
Need a hint?

Just create a variable named min_photos and assign the number 3.

3
Filter photos with valid GPS coordinates
Create a new dictionary called valid_photos that includes only entries from photos where the GPS coordinates are not None
Drone Programming
Need a hint?

Use a dictionary comprehension to keep only photos where coordinates are not None.

4
Print the list of valid photo IDs
Print the list of keys from valid_photos using print(list(valid_photos.keys()))
Drone Programming
Need a hint?

Use print(list(valid_photos.keys())) to show the photo IDs.