Optimisation of geothermal resources in urban areas