First rule of contesting parking violations--never tell them that you were even a little bit over the line. Because that's an admission that you did something wrong, and that justifies their decision to tow. If you're going to contest (and I think it's worth the effort; I contest all parking violations), take your car back to the place it was towed from and take pictures of where it was when it was towed. Then just go into the hearing armed with the pictures, and tell them you weren't over the line, here's where you were parked, and you were towed anyway. If San Francisco is like Philadelphia, the fact that you showed up to a hearing bearing some type of proof should be enough.