Automatic modelling of buildings and thermal substations for large district heating systems