Download Presentation
## Geocoding and Routing

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Geocoding and Routing**Ya can’t get thereah from hereah! CS 128/ES 228 - Lecture 9a**The Traveling Salesman Problem (TSP)**Insert Joke Here • A Salesman must visit each of N cities and return to his home base, driving as few miles as possible CS 128/ES 228 - Lecture 9a**Difficulty of TSP**• Of interest to theoretical computer scientists because The Problem Is HARD • So hard that if you could compute an exact solution efficiently, you could also disrupt the world’s financial markets CS 128/ES 228 - Lecture 9a**Applications of TSP**• Inspection routes • Traveling Salespersons • Delivery professionals CS 128/ES 228 - Lecture 9a**Knowing Where You Are**GEOCODING “is the process of converting an address into a point location.” McDonnell and Kemp, International GIS Dictionary, 2nd Ed., 1998 “Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are.” Buckaroo Banzai (from The Adventures of Buckaroo Banzai Across the Eighth Dimension) CS 128/ES 228 - Lecture 9a**TIGER Maps – The Key to Routing**• TIGER mapsare the primary data set used for geocoding. • … and geocoding is the basis for all routing. CS 128/ES 228 - Lecture 9a**Dr. Levine’s House**TIGER Map of the Area CS 128/ES 228 - Lecture 9a**TIGER Attribute Data**CS 128/ES 228 - Lecture 9a**Some Useful Fields**CS 128/ES 228 - Lecture 9a**23**How to Find an Address • Find the records for the appropriate street. (There may be more than one.) • Find the particular record whose address range includes your house number. • Decide “left” or “right” based on parity. • Interpolate. CS 128/ES 228 - Lecture 9a**http://www.mapquest.com**But Apply Georgian’s First Law (of data processing) Don’t process the data yourself; get someone else to do it CS 128/ES 228 - Lecture 9a**Dr. Georgian says he lives here**Mapquest says Dr. Georgian lives here Limitations of Geocoding Whom do you believe? CS 128/ES 228 - Lecture 9a**Why Is It Wrong?**Where is Dr. Levine’s House? (#3299) CS 128/ES 228 - Lecture 9a**A Common TIGER Error**• TIGER Files commonly miscode the F… and T… fields. • This results in various “mirroring” errors. • Newer versions of the data make this error less frequently. • Both Dr. Georgian and Dr. Levine are “victims” of this kind of error. CS 128/ES 228 - Lecture 9a**This road does not exist!**Other TIGER Errors Data Lag causes errors as new roads are (or are not) built CS 128/ES 228 - Lecture 9a**How Do We “Really” Do It?**By following instructions in tomorrow’s lab! CS 128/ES 228 - Lecture 9a**Going “Big” Time**One can easily geocode many addresses at once. Place them all in a table and then ask the system to do so. This gives you all of your “hot” locations. CS 128/ES 228 - Lecture 9a**Now, How Do You Visit Them All?**CS 128/ES 228 - Lecture 9a**How many ways are there?**For 20 stops, there are 20x19x18x…x3x2x1 = 2,432,902,008,176,640,000 Possible routes! (that’s 2 quintillion) Once again, we cannot be exact Once again, we need a GIS CS 128/ES 228 - Lecture 9a**A Simple (non-)Solution**• Choose the route yourself • It turns out that humans, particularly experienced humans, are good at this • Then check only your 3 (or 40) best guesses! CS 128/ES 228 - Lecture 9a**Working with Simpler Routes**• So it can be done • And we can’t do it CS 128/ES 228 - Lecture 9a**A Poor Man’s Solution**• Select the lines that comprise your route. • Create a layer out of the selection. • Create a query that sums the lengths of the roads. CS 128/ES 228 - Lecture 9a**Conclusions**? • Finding, Creating, and Measuring routes is a key task of many GIS’s. • With ArcMap, we can do this for Points (geocoding), but not for extended routes. • There are some “workarounds” we can use. CS 128/ES 228 - Lecture 9a