How environmental and energy issues shape the cities: a case-study in Barcelona, Spain