geocoding and routing
DESCRIPTION
Geocoding and Routing. Ya can’t get thereah from hereah!. 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. Difficulty of TSP. Of interest to theoretical computer scientists because - PowerPoint PPT PresentationTRANSCRIPT
CS 128/ES 228 - Lecture 9a 1
Geocoding and Routing
Ya can’t get thereah from
hereah!
CS 128/ES 228 - Lecture 9a 2
The Traveling Salesman Problem (TSP)
A Salesman must visit each of N cities and return to his home base, driving as few miles as possible
Insert Joke Here
CS 128/ES 228 - Lecture 9a 3
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 4
Applications of TSP
Inspection routes
Traveling Salespersons
Delivery professionals
CS 128/ES 228 - Lecture 9a 5
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 6
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 7
TIGER Map of the Area
Dr. Levine’s House
CS 128/ES 228 - Lecture 9a 8
TIGER Attribute Data
CS 128/ES 228 - Lecture 9a 9
Some Useful Fields
FID Field ID Number
LENGTH Length of full extent
FNODE Intersection of “start” of street
TNODE Intersection of “end” of street
FENAME Street name (root)
FRADDR # of first house on RIGHT side
TOADDL # of last house on LEFT side
ZIPR Zip code of RIGHT side
CS 128/ES 228 - Lecture 9a 10
How to Find an Address
1. Find the records for the appropriate street. (There may be more than one.)
2. Find the particular record whose address range includes your house number.
3. Decide “left” or “right” based on parity.
4. Interpolate.
23
CS 128/ES 228 - Lecture 9a 11
But Apply Georgian’s First Law
Don’t process the data yourself; get someone else to do it
(of data processing)
http://www.mapquest.com
CS 128/ES 228 - Lecture 9a 12
Limitations of Geocoding
Mapquest says Dr. Georgian lives here
Dr. Georgian says he lives here
Whom do you believe?
CS 128/ES 228 - Lecture 9a 13
Why Is It Wrong?
FRADDR 3179
TOADDR 3297
FRADDL 0
TOADDL 0
Where is Dr. Levine’s House?
(#3299)
CS 128/ES 228 - Lecture 9a 14
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 15
Other TIGER Errors
This road does not exist!
Data Lag
causes errors as new roads are (or are not) built
CS 128/ES 228 - Lecture 9a 16
How Do We “Really” Do It?
By following instructions in tomorrow’s lab!
CS 128/ES 228 - Lecture 9a 17
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 18
Now, How Do You Visit Them All?
CS 128/ES 228 - Lecture 9a 19
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 20
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 21
Working with Simpler Routes
So it can be done
And we can’t do it
CS 128/ES 228 - Lecture 9a 22
A Poor Man’s Solution
1. Select the lines that comprise your route.
2. Create a layer out of the selection.
3. Create a query that sums the lengths of the roads.
CS 128/ES 228 - Lecture 9a 23
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.
?