We prove an asymptotic crystallization result in two dimensions for a class of nonlocal particle systems. To be precise, we consider the best approximation with respect to the 2-Wasserstein metric of a given absolutely continuous probability measure $$f \mathrm {d}x$$
f
d
x
by a discrete probability measure $$\sum _i m_i \delta _{z_i}$$
∑
i
m
i
δ
z
i
, subject to a constraint on the particle sizes $$m_i$$
m
i
. The locations $$z_i$$
z
i
of the particles, their sizes $$m_i$$
m
i
, and the number of particles are all unknowns of the problem. We study a one-parameter family of constraints. This is an example of an optimal location problem (or an optimal sampling or quantization problem) and it has applications in economics, signal compression, and numerical integration. We establish the asymptotic minimum value of the (rescaled) approximation error as the number of particles goes to infinity. In particular, we show that for the constrained best approximation of the Lebesgue measure by a discrete measure, the discrete measure whose support is a triangular lattice is asymptotically optimal. In addition, we prove an analogous result for a problem where the constraint is replaced by a penalization. These results can also be viewed as the asymptotic optimality of the hexagonal tiling for an optimal partitioning problem. They generalise the crystallization result of Bourne et al. (Commun Math Phys, 329: 117–140, 2014) from a single particle system to a class of particle systems, and prove a case of a conjecture by Bouchitté et al. (J Math Pures Appl, 95:382–419, 2011). Finally, we prove a crystallization result which states that optimal configurations with energy close to that of a triangular lattice are geometrically close to a triangular lattice.