It's an old style hydrant wrench. They changed to the pentagonal top in the sixties in most cities... keeps kids with a cresent wrench from opening them up and playing in the streets. The square tops can still be found.... although rarely... in the rural areas that have plugs. The county that I was a firefighter in still had both and ours were combination wrenches...had the square end and the pentagonal end.
BTW, gas petcock valves are long and thin... something like 3/8" X 1 1/4" ... although I have seen the small square valves that only measure 1/4" X 1/4".
And a spanner wrench is just that... a wrench that spans... as opposed to completely surrounding. There are many different types of spanners, but they are all typically open-ended.