[Mapserver-users] MapServer, routing/driving directions, TIGER data

woodbri at swoodbridge.com woodbri at swoodbridge.com
Wed Feb 19 19:15:16 EST 2003


On 19 Feb 2003 at 10:51, ew at xmission.com wrote:

> I downloaded the TIGER Line files for Utah, loaded them into a MySQL
> database, and have perl script to quickly (.5 sec) find their lat/long
> based on their street address (with city or zipcode).

Yup, the RT1 records give you the end points of segments in lat/lon 
and they have info about street number ranges and zipcodes. You also 
need RT2 records which provide the shape info about the line segment 
if you want accurate positioning. A road the forms a 'C' where the 
ends of the 'C' join another road would be represented in the RT1 
file as a straight line from one end of the 'C' to the other and the 
info in the RT2 record provides the curve to the 'C' shape.

> So, I need to use a router recursive algorithim to find the shortest
> route of TIGER street vectors between the two points to get driving
> directions.  Anyone have a good way to do this?

Having already implemented a router, I can tell you that you do NOT 
want to do a recursive search of the network it will be WAAAAAY to 
slow. You need to implement Dijstra's algorithm or an A* search or a 
branch and bound algorithm.

Also, the tiger data does not have street directionality nor does it 
have info that will let you know whether you can turn onto an over-
pass or not. In Tiger data a road the intersects another road visual 
is a topological intersection even though it is not a drivable 
intersection.

> Does MapServer offer this functionality through any extensions or
> anything?  Could I do the querying of the lat/long for an address from
> MapServer with the TIGER in shp files, or should I continue having it
> in a MySQL db?  In essence, is MapServer just for drawing maps via a
> CGI interface,  or can it be queried for scalar information from the
> map files it uses?

No, this functionality is not in mapserver in any way that would 
support general purpose geocoding. I also wrote a geocoder and a 
Tiger to Shape converter. You can check them out at 

http://imaptools.com

They are not OpenSource.

Some exciting news from the Census is the fact that Tiger files after 
the 2002 release which just came out will have much of the 
information about intersections so one will be able to use that in 
routing applications.

Keeping the geocoding data in MySQL is great and it gives you the 
power of SQL to do your queries.

Developing a routing application is a bit more challenging, but can 
be done if you are willing to do a little research. If you have 
specific questions or want to bounce ideas off me, send me some 
email.

-Steve W.



More information about the mapserver-users mailing list