I had had a problem with horizontal lines in my census maps mashups for a long time. Note the line at the bottom left.
I was sure it was a bug in my code because the graphics library that I used, gd, was extremely mature and heavily-used. (Way back in 1994 or 1995, my then-office partner Carlos Pero was using gd for Carlos’ Coloring Book!)
It turned out to be a bug in the gd polygon fill code. The fix turned out to be a very small number of lines of code, so if you are having problems with horizontal lines occasionally appearing in your images, look there.
More keywords: libgd, gdlib gd lib, flat, fill polygon, colored polygon, horizontal line, missing line, extra line, flat line, sideways line