We study the number, size, and location of a firm’s plants. The firm’s decision balances the benefit of delivering goods and services to customers using multiple plants with the cost of setting up and managing these plants, and the potential for cannibalization that arises as their number increases. Modelling the decisions of heterogeneous firms in an economy with a vast number of widely distinct locations is complex because it involves a large combinatorial problem. Using insights from discrete geometry, we study a tractable limit case of this problem in which these forces operate at a local level. Our analysis delivers clear predictions on sorting across space. Productive firms place more plants in dense locations that exhibit high rents compared with less productive firms, and place fewer plants in markets with low density and low rents. Controlling for the number of plants, productive firms also operate larger plants than those operated by less productive firms in locations where both are present. We present evidence consistent with these and several other predictions using U.S. establishment-level panel data.