150 likes | 252 Views
Generating Directions. Lecture 2 Map Data Path Based Plan. Before we start. NDA mdina.zip (for a few days). Sentence Planner. Path Planner. Text Planner. Realisation. Proposed Architecture. GIS Map. Query. Path Based Plan. Message Based Plan. Sentence Plan. Text. Map Data Files.
E N D
Generating Directions Lecture 2 Map Data Path Based Plan Generating Directions
Before we start • NDA • mdina.zip (for a few days) Generating Directions
Sentence Planner Path Planner Text Planner Realisation Proposed Architecture GIS Map Query Path Based Plan Message Based Plan Sentence Plan Text Generating Directions
Map Data Files • These exist 3 data files with tab separated data inside them. • These files describe • Buildings • Routes (ie streets) • Way points: points on streets • Minor errors in data (St. names) Generating Directions
Buildings Example: MDINA 1 TRIQ VILLEGAIGNON 0 MDINA DUNGEON O 35.845252 14.369577 Attributes in order • Location: char(32) • Building ID: int • Street Prefix: char(15) • Street Name: char(80) • Building Number: int • Building Name: char(10) • Building Proper Name: char (80) • Building Type: char(1) C:commercial, O: other • X coord and y coord:float Generating Directions
Routes Example: MDINA 1 SQAQ ARAGONA RBT 12 Attributes in this order: • Location: char(32) • Route ID: int • Street Prefix:char(15) • Street Name:char(80) • Postcode:char(8) Generating Directions
Routes Way Points Examples 1 MDINA 1 SQAQ ARAGONA RBT 12 35.766601 14.399467 2 MDINA 1 SQAQ ARAGONA RBT 12 35.770655 14.401142 • Attributes in order • Way Point ID: number • Location: char(32) • Route ID: number • Street Prefix: char (15) • Street Name: char(80) • Postcode: char(8) • X coord and Y coord:float Generating Directions
Summary • Route way points give you enough description of intersections and roads • ‘Buildings’ files gives you info on which road they reside, just missing route id • Thus it is possible to build description of buildings when traversing route. • A subtask will be to build your system to describe buildings while going through just one road Generating Directions
Search Problem • Given start and goal positions, compute path-based plan. • State-based search • start node • end node • operators • search strategy Generating Directions
Start and End Nodes • Can be specified in any reasonable way e.g. • Coordinates • Building • Point of intersection • Waypoint Generating Directions
Operators • Operator = state to state transformation • Consider each operator to be a path between adjacent points of intersection. • Operator data structure minimally contains start and end points. • Later details of journey can be added (buildings etc.) Generating Directions
Method • Define classes: point; path; plan .... • Compute all intersection points from map data. • Compute set of "operators" (paths) = journeys between adjacent intersection points • Find intersection points nearest start and goal. • Search for spanning path using paths between intersection points. Generating Directions
Search • Algorithm which checks which road to go through to arrive from point A to point B. • You will need appropriate algorithms or data structures for intersections. • Start off using brute force search. • Watch out for infinite recursions! • This should give you a route through a series of route ids. • See Russell & Norvig (2003) for details of search algorithms. Generating Directions
Taken from Russell & Norvig 2003 Generating Directions
Next • Elaboration of Path-Based Plan • Path-Based Plan => Message Based Plan. Generating Directions