administrative stuff ece 297. administration milestone 0: –submit by friday at 5 pm –demo in lab...
TRANSCRIPT
![Page 1: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/1.jpg)
Administrative Stuff
ECE 297
![Page 2: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/2.jpg)
Administration
• Milestone 0: – Submit by Friday at 5 pm– Demo in lab this week– Write your name on the board when ready to
be marked first on board, first to be marked
![Page 3: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/3.jpg)
Administration
• Milestone 1:– Plan to release today (course website)– Submit by Monday, Feb. 2 @ 5 pm– 9% of final mark
• 6% auto-graded– 4% functionality– 2% runtime (pass / fail speed tests)
• 3% by TA– Coding style, SVN use and log messages, created unit
tests, can answer questions about code– TA will ask questions the week of the submission (Feb.
2)
![Page 4: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/4.jpg)
Administration
• Tutorial: more advanced STL containers– <list> (linked list)– <map> (binary tree)– iterators let you walk through these data
structures
• All tutorial rooms / times will happen– Friday 9 – 11: both GB 412 & SF 2202
• Team selection– Select by Friday night– Head TA will be setting up wiki pages &
shared directories over weekend
![Page 5: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/5.jpg)
OpenStreetMap and Graphs
ECE 297
![Page 6: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/6.jpg)
OpenStreetMap
• Open geographic database of the world– Created by regular people contributing data
![Page 7: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/7.jpg)
OSM Data
• (lattitude,longitude) points (OSM nodes)– Each also has a unique integer id
• Lists of points (OSM ways) that form – A piece of a road– A shoreline– A park boundary– etc.
• Optional tags on these points and ways– key,value pairs– e.g. name = Yonge– e.g. natural = water
• Documented at http://wiki.openstreetmap.org/wiki/Main_Page
![Page 8: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/8.jpg)
Big Data!
• Can download all the data for the planet, in xml format– planet.osm: 498 GB file!
• Hard to work with!• Have extracted & downloaded 3 cities
– Toronto.osm (383 MB)– Hamilton– Cairo
![Page 9: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/9.jpg)
OSM Trade-offs
• Positive– Powerful: lots of data, few restrictions– XML is text human readable
• Negative– Data is low-level can be hard to interpret– Data can be somewhat inconsistent (e.g. few
absolute rules on names entered by volunteers)
– Big (383 MB for Toronto)– Slow to load (45 seconds for Toronto)
![Page 10: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/10.jpg)
Solution: Parse, Reduce, Refine
• osm2bin program– Written by course TA (Jeff Cassidy)– Reads in raw OSM data– Applies consistency checks– Organizes data– Writes out only essential data in exact binary
form needed to load our (libstreetsdatabase) classes
• toronto.bin: 38 MB
– Can load this data back in very fast (1 s) to initialize the same classes
• This is called class serialization• We use a library called boost serialization
![Page 11: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/11.jpg)
API layers in milestone 1
.osmOSM2BIN toronto.osm
This is the api you will build higher level, more full featured
You will talk to this api need to understand it
You are given this header need to write the implementation (.cpp files) for all the functions in it
![Page 12: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/12.jpg)
Organizing the Map Data
The lower-level API you’ll talk to
![Page 13: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/13.jpg)
What Will We Do with the Data?
• Milestone 1: Use The provided API (StreetsDatabaseAPI.h) to implement various functions. E.g. vector<string> find_intersection_street_names (
string intersection_name);
• Milestone 2: Graphics – use the provided API and m1 functions to visualize the map.
• Milestone 3: Pathfinding – find paths through the map between 2 intersections
• Milestone 4: Courier company (Traveling Salesman) – find a path through n points on the map.
![Page 14: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/14.jpg)
How would you represent a street map?
• As a graph!– G = (V, E)– Vertices (V)?– Edges (E)?
Intersections
Street Segments (City blocks)
![Page 15: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/15.jpg)
Map as a Graph
![Page 16: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/16.jpg)
libstreetsdatabase
• How to identify each vertex? – unique integer id small, fast
• 0 to getNumberOfIntersections() - 1;• ~166,000 for Toronto
– unique string name convenient for end user
0
1
2
3
4
Bloor & Yonge
Bay & College
Bloor & Bay
College & Spadina
DVP & unknown(20)
![Page 17: Administrative Stuff ECE 297. Administration Milestone 0: –Submit by Friday at 5 pm –Demo in lab this week –Write your name on the board when ready to](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649dbe5503460f94ab0f19/html5/thumbnails/17.jpg)
libstreetsdatabase
• How to identify each edge (StreetSegment)? – unique integer id small, fast
• 0 to getNumberOfStreetSegments() - 1;• ~215,000 for Toronto
– no unique string name
0
1
2
3
4
Bloor & Yonge
Bay & College
Bloor & Bay
College & Spadina
DVP & unknown(20)
01
2 3
4
5