See also https://en.wikipedia.org/wiki/Central_place_theory (and the many other discussions of this and related market-area models).