We consider an infinite time horizon spatially distributed optimal harvesting problem for a vegetation and soil water reaction diffusion system, with rainfall as the main external parameter. By Pontryagin's maximum principle we derive the associated four component canonical system, and numerically analyze this and hence the optimal control problem in two steps. First we numerically compute a rather rich bifurcation structure of flat (spatially homogeneous) and patterned canonical steady states (FCSS and PCSS, respectively), in 1D and 2D. Then we compute time dependent solutions of the canonical system that connect to some FCSS or PCSS. The method is efficient in dealing with non-unique canonical steady states, and thus also with multiple local maxima of the objective function. It turns out that over wide parameter regimes the FCSS, i.e., spatially uniform harvesting, are not optimal. Instead, controlling the system to a PCSS yields a higher profit. Moreover, compared to (a simple model of) private optimization, the social control gives a higher yield, and vegetation survives for much lower rainfall. In addition, the computation of the optimal (social) control gives an optimal tax to incorporate into the private optimization.