Comment
What you are describing is a side of a square that the octagon is placed inside of. Every other side of the regular octagon touch the middle of the square's side. the other 4 sides of the octagon go at a diagonal of 45 degrees to the ends of the first set of sides. There is a diagram below to help you understand this description.
Formula
The stop Sign's line going from flat to flat is S
S = a + 2*a*sqrt(2)/2
a + 2*a*sqrt(2)/2 = 30
a + a*sqrt(2)
Solve
a + a*1.414 = 30
a + 1.414*a = 30
2.414 a = 30 Divide by 2.414
a = 30/2.414
a = 12.428 <<<<< Answer