Population density isn’t planar, eg, why cities are denser than towns: their centers are more than 2D.

Population density is literally measured over a planar metric: people/km^2

You are suggesting it's measured over a cube volume?

3d population density would be an interesting measure, though. It would provide a better feel for how cramped a populated volume actually is.

It would have to be the displacement volume, to account for cities with only a few really tall buildings, and also somehow adjusted for buildings with high ceilings.

There are some really dense people

Some people are dense... now in three dimensions!