The pyramid structure is used to illustrate that upper layer concepts are supported by the bottom layer concepts. So, in this case, dignity is less essential than safety. Given safety, one can begin to develop dignity.
They go hand in hand; unsafe infrastructure is inherently undignified to use. It is both unsafe and undignified to walk in a dirt ditch due to lack of sidewalks.