This reminds me of the time I wrote code that takes a sequence of line segments and expands them to become a strip of polygons, with correctly adjusted textures so that the dotted line down the middle of the road doesn't look chopped-up. I seem to remember this took a whole weekend, and I was so exhausted with it by the end I never made further progress on my Geo::SpatialDB project :-\