{'fraction_non_alphanumeric': 0.026347465561053898, 'fraction_numerical': 0.008807963468923747, 'mean_word_length': 5.2361491719289885, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A GIS-Based Procedure for Estimating the Energy Demand Proﬁles of Buildings towards Urban Energy Policies

: Assessing the existing building stock’s hourly energy demand and predicting its variation due to energy efﬁciency measures are fundamental for planning strategies towards renewable-based Smart Energy Systems. However, the need for accurate methods for this purpose in the literature arises. The present article describes a GIS-based procedure developed for estimating the energy demand proﬁles of urban buildings based on the deﬁnition of the volumetric consistency of a building stock, characterized by different ages of construction and the most widespread uses, as well as dynamic simulations of a set of Building Energy Models adopting different energy-related features. The simulation models are based on a simple Building Energy Concept where selected thermal zones, representative of different boundary conditions options, are accounted. By associating the simulated hourly energy density proﬁles to the geo-referenced building stock and to the surveyed thermal system types, the whole hourly energy proﬁle is estimated for the considered area. The method was tested on the building stock of Milan (Italy) and validated with the data available from the annual energy balance of the city. This procedure could support energy planners in deﬁning urban energy demand proﬁles for energy policy scenarios.


Introduction
The European Union (EU) has committed to develop a sustainable, competitive, secure, and decarbonized energy system by 2050, which also includes measures regarding the building stock, as it is responsible for approximately 36% of the related carbon dioxide emissions [1]. Indeed, significant efforts from academic research and policies are devoted to promoting the connection of buildings to district heating and cooling (DHC) networks [2] and their integration with distributed energy generation sources, which is based on often unpredictable and intermittent renewable energy sources (RES), as well as promoting flexible solutions (e.g., demand response strategies, storages, etc.) [3]. Realistically, coordinating the interactions among the variable energy fluxes to minimize the energy system costs and greenhouse gas emissions is quite complex [4]. Hence, for optimal planning of energy systems, an accurate assessment of the hourly demand fluctuations of the building stock, as foreseen by using advanced tools for urban energy planning [5] and of their variation due to implemented Energy Efficiency Measures (EEMs) on the buildings' envelope and/or systems, is relevant.
To that end, the development of Urban Building Energy Models (UBEMs) [6], usually integrated with Geographic Information Systems (GIS), can help in assessing the existing built environment's energy behavior, although this is not an easy task [7]. On the one hand, the need of a large set of accurate information collides with data availability, accessibility, and quality issues [8]; on the other hand, most of the current UBEMs exploit some simplifications (e.g., in terms of calculation methods, geometry assessments of buildings, etc.) to enable running urban scale simulations with an acceptable computational effort [9].
As deeply discussed in a previous literature review by the same authors of this study [10], beyond the studies adopting time-aggregated energy data, the noteworthy studies for the adoption of detailed energy profiles are attributed to two categories: those adopting engineering methods and those adopting statistical methods. In this regard, it has been outlined that, differently from accurate and robust statistical methods that require a large amount of historical data, engineering methods based on detailed energy simulations of representative buildings can ensure enough accurate estimations.
Even though most of existing studies that concern the use of GIS for modeling the urban energy demand rely on annual or monthly energy demands, a few studies have been found in the literature that deal with the accounting of building stocks' energy use at a high temporal resolution. In this regard, a well-established technique to obtain the energy demand at an urban level is the upscaling of energy profiles defined for a set of representative buildings, be they samples of real buildings, building archetypes, or a combination of them, as outlined in the following examples. In the study of de Oliveira et al. [11], the hourly profile of the thermal energy demand for a district building stock in Geneva (Switzerland) was obtained by modulating the sums of the geo-referenced annual thermal demands of the buildings based on the measured thermal profile of a sample of residential buildings. In the study of Kazas et al. [12], the hourly thermal energy demand profile of a building block in Turin (Italy) was obtained by associating to its buildings the profiles parametrically determined based on the profile of only one sample building in the block, simulated with EnergyPlus [13] and calibrated with measured consumptions. In the study of Nageler et al. [14], once having validated the hourly energy demand profiles of building archetypes simulated with IDA ICE [15] against measured profiles of selected buildings connected to a district heating in Gleisdorf (Austria), the former ones were simulated, representing all urban buildings. In the study of Heiple and Sailor [16], dynamic energy simulations of a set of building archetypes were accomplished by means of the E-QUEST tool [17], and resulting energy consumption profiles have been associated to the geo-referenced buildings in Houston (Texas). In the study of Fonseca and Schlueter [18], based on the EU standard ISO 13790 [19] and the Swiss workbook SIA 2024 [20], space heating/cooling and electricity energy consumption profiles have been calculated for defined building archetypes and then associated to the geo-referenced buildings of a district in Zug (Switzerland). In the study of Siddiqui et al. [21], a method to estimate hourly space and water heating loads of urban areas through a simplified heat transfer calculation method applied to building archetypes was developed and tested on a district in London (UK).
Some of the analyzed studies have shown that the use of few representative buildings (in general, buildings characterized based on age, use category, and compactness ratio) in energy assessments on an urban scale can be questionable [11]. Indeed, in [16], it was pointed out that the use of many representative buildings could be more suitable, especially in the case of heterogeneous districts. In [14], in which a thermal zoning based only on the distinction among floors was adopted, it was pointed out that the addition of a core unconditioned thermal zone could improve modeling of multi-family and other large buildings.
Hence, to overcome such a rigidity of the representative buildings' technique, it could be helpful to go beyond the scheme of building archetypes and samples and instead develop simplified building energy models. The present article reports the outcomes of a research, which was carried out within the last two years of the research group activities, aimed at developing a GIS-based procedure for estimating urban buildings' energy demand profiles towards urban energy policies. The novelty of the study is that the developed procedure is based on a set of dynamic simulation results carried out on a simplified building energy model composed of thermal zones representative of the different boundary conditions options, i.e., heat exchange behavior based on the position within the building volume, composing any common building geometry. The UBEM obtained thanks to the procedure implementation is featured by a high temporal resolution and, remarkably, relies on public datasets foreseen under the umbrella of the EU Directive INSPIRE [22], which calls for enhancing the harmonization and interoperability of spatial data across the Member States as a supporting tool for energy and environmental policies.

Materials and Methods
The defined GIS-based procedure enables the calculation of building stock volume, which is differently characterized based on construction periods for accounting related building features, mostly diffuse urban use categories (residential and administrative offices) and Typical Thermal Zones (TTZs) affecting different heat exchange behaviors.
Besides, a set of Building Energy Models (BEMs) has been defined based on a Building Energy Concept (BEC), i.e., a simplified building geometry as described in detail in the next section, alternatively featured by setting different usage profiles and by assuming the technological solutions typical of the different periods of construction in which the TTZs, representative of the different boundary condition options composing any common building geometry, are accounted. Hence, through a dynamic energy simulation software, hourly electric density load profiles for appliances and artificial lighting, and, for each TTZ, different thermal energy density profiles of space heating and cooling needs, are obtained.
Then, these energy density hourly values [W/m 3 ] can be associated to the considered built volume calculated through the GIS procedure to derive the urban building stock's thermal and electric energy profiles and spatial distribution.
Additionally, the georeferencing and spatial assessment of installed thermal systems is carried out and, by associating the typical efficiencies of heating and cooling systems, the final energy consumption profiles of the urban stock are also determined.
The defined procedure, which is reported in detail in Figure 1, has been applied to assess the building stock of the city of Milan (Italy), which was selected as a case study. building energy model composed of thermal zones representative of the different boundary conditions options, i.e., heat exchange behavior based on the position within the building volume, composing any common building geometry. The UBEM obtained thanks to the procedure implementation is featured by a high temporal resolution and, remarkably, relies on public datasets foreseen under the umbrella of the EU Directive INSPIRE [22], which calls for enhancing the harmonization and interoperability of spatial data across the Member States as a supporting tool for energy and environmental policies.

Materials and Methods
The defined GIS-based procedure enables the calculation of building stock volume, which is differently characterized based on construction periods for accounting related building features, mostly diffuse urban use categories (residential and administrative offices) and Typical Thermal Zones (TTZs) affecting different heat exchange behaviors.
Besides, a set of Building Energy Models (BEMs) has been defined based on a Building Energy Concept (BEC), i.e., a simplified building geometry as described in detail in the next section, alternatively featured by setting different usage profiles and by assuming the technological solutions typical of the different periods of construction in which the TTZs, representative of the different boundary condition options composing any common building geometry, are accounted. Hence, through a dynamic energy simulation software, hourly electric density load profiles for appliances and artificial lighting, and, for each TTZ, different thermal energy density profiles of space heating and cooling needs, are obtained.
Then, these energy density hourly values [W/m 3 ] can be associated to the considered built volume calculated through the GIS procedure to derive the urban building stock's thermal and electric energy profiles and spatial distribution.
Additionally, the georeferencing and spatial assessment of installed thermal systems is carried out and, by associating the typical efficiencies of heating and cooling systems, the final energy consumption profiles of the urban stock are also determined.
The defined procedure, which is reported in detail in Figure 1, has been applied to assess the building stock of the city of Milan (Italy), which was selected as a case study.

Definition of the Building Energy Concept and Typical Thermal Zones
The BEC is assumed as a building with a rectangular plan and five floors above an unconditioned basement (i.e., garages, cellars, technical rooms, etc.) [23]. The upper floors are divided into a central unconditioned distribution volume and two opposite conditioned volumes defining the main building façades. For each floor, five square conditioned thermal zones per façade have been assumed. Based on this BEC, the TTZs referring to the different combinations of horizontal and vertical boundary condition options, also composing any common building geometry, can be identified as detailed below.
Analyzing the building stories, differently from all the intermediate floors, the first conditioned one has a horizontal boundary facing the unconditioned basement, and the last conditioned one faces the sky. As a result, three different types of floors can be assumed: ground, intermediate, and top. Then, by considering also the different vertical boundary conditions of the thermal zones composing the building, three TTZs can be identified for each floor: two located on the corners, thus having two vertical walls towards the outside, and one placed at an intermediate position, thus having just one vertical wall facing outside. In total, by coupling horizontal and vertical conditions, the nine different TTZs are obtained.
Moreover, since a random orientation of buildings in considering a large urban context can be assumed, the average energy performance from the simulations results, obtained by rotating the model based on the four main orientations (north, south, east, and west), can be adopted to be applied to the considered building stock with good approximation. Therefore, only three of the six symmetric corner thermal zones can be assumed, thus reducing the number of the TTZs from nine to six ( Figure 2).

Definition of the Building Energy Concept and Typical Thermal Zones
The BEC is assumed as a building with a rectangular plan and five floors above an unconditioned basement (i.e., garages, cellars, technical rooms, etc.) [23]. The upper floors are divided into a central unconditioned distribution volume and two opposite conditioned volumes defining the main building façades. For each floor, five square conditioned thermal zones per façade have been assumed.
Based on this BEC, the TTZs referring to the different combinations of horizontal and vertical boundary condition options, also composing any common building geometry, can be identified as detailed below.
Analyzing the building stories, differently from all the intermediate floors, the first conditioned one has a horizontal boundary facing the unconditioned basement, and the last conditioned one faces the sky. As a result, three different types of floors can be assumed: ground, intermediate, and top. Then, by considering also the different vertical boundary conditions of the thermal zones composing the building, three TTZs can be identified for each floor: two located on the corners, thus having two vertical walls towards the outside, and one placed at an intermediate position, thus having just one vertical wall facing outside. In total, by coupling horizontal and vertical conditions, the nine different TTZs are obtained.
Moreover, since a random orientation of buildings in considering a large urban context can be assumed, the average energy performance from the simulations results, obtained by rotating the model based on the four main orientations (north, south, east, and west), can be adopted to be applied to the considered building stock with good approximation. Therefore, only three of the six symmetric corner thermal zones can be assumed, thus reducing the number of the TTZs from nine to six ( Figure 2).

GIS-Based Procedure for Characterizing an Urban Building Stock
The procedure to implement a geo-database of the urban building stock volume, differently characterized based on construction periods, type of thermal zones depending on the boundary conditions, use categories, and thermal systems has been set in the opensource QGIS software [24] and is described in detail in the following subsections.

Base-Map Preparation (A)
The data adopted in this study for calculating the built volume come from the Topographic Database (TDb). The TDb is a relational database of georeferenced and continuously updatable data which is gradually replacing the traditional raster cartography and is currently under standardization according to the National and EU specifications [22,25]. Among the wide set of available data, the following ones have been used for each georeferenced building: overall footprint, status of occupancy (utilized or abandoned, ruin/under construction), and different composition in built volumes, having their own footprints and heights.

GIS-Based Procedure for Characterizing an Urban Building Stock
The procedure to implement a geo-database of the urban building stock volume, differently characterized based on construction periods, type of thermal zones depending on the boundary conditions, use categories, and thermal systems has been set in the open-source QGIS software [24] and is described in detail in the following subsections.

Base-Map Preparation (A)
The data adopted in this study for calculating the built volume come from the Topographic Database (TDb). The TDb is a relational database of georeferenced and continuously updatable data which is gradually replacing the traditional raster cartography and is currently under standardization according to the National and EU specifications [22,25]. Among the wide set of available data, the following ones have been used for each geo-referenced building: overall footprint, status of occupancy (utilized or abandoned, ruin/under construction), and different composition in built volumes, having their own footprints and heights.
Along with this, the data adopted in this study for characterizing the building stock by period of construction and use category come from the 15th General Census of Population and Houses (GCPH) [26]. The GCPH is the periodically updated national census (for the last useful available data, refer to year 2011) carried out by the National Institution of Statistics (Istat), collecting information on population and built environment consistency. For each geo-referenced Census Unit (the minimum spatial unit used for collecting statistical data; it usually refers to a group of a few buildings), the available data adopted for developing this study are the number of building units per each period of construction, the number and net surface of the residential building units, the number of non-residential buildings, and among these, the number of office buildings. As down-scaling the GCPH data at the building level is not possible, the Census Unit is adopted as the reference scale of the procedure outputs.
To assess the installed thermal systems in office buildings, the data on inspected systems from the Thermal Systems Cadaster (TSC), which each Italian region must implement [27], are considered. The available information used for this study regards the address and use category of the building as well as the type, size, and fuel of both the space heating and cooling thermal systems. In the case of residential buildings, to include also small-sized individual thermal systems which are not included in the TSC, the data collected for sample building units in the frame of the GCPH are adopted. The available information used for this study regards the building unit surface, the distribution systems type (centralized or individual) and space heating systems fuel, the distribution systems type of domestic hot water (DHW) systems (combined or DHW-only) and the thermal system fuel in the DHW-only case, and the presence of a space cooling production unit.
After having imported the mentioned data in the GIS tool (A1), once the selection of the urban area of interest (A2), dataset cleaning (A3), and related spatial correlation of the different datasets has been completed (A4), according to the detailed description in [28], the characterization of the considered building stock can be accomplished as described in the following subsection.

Building Stock Characterization (B)
In the following paragraphs, the procedures for the characterization of the building stock are explained.

•
Assessment of the prevailing period of construction (B1).
The periods of construction are taken into account for assigning the different energy performances, assessed through the BEMs simulations described below, to the considered building stock.
Since the data from the GCPH are provided as aggregated at the Census Unit level, based on the consistency in terms of number of residential building units per each period of construction (<1919, 1945-60, 1961-70, 1971-80, 1981-90, 1991-2000, 2001-2005, >2005), a prevailing period is determined and associated to all the buildings included in each Census Unit (periods improperly associated to the minority of the buildings in each Census Unit are assumed as negligible in large-scale analyses).
Once the small built volumes that are higher than the prevalent building height (i.e., stairwell) have been identified and excluded, the conditioned volume of each building is determined. Then, all the contiguous conditioned volumes (i.e., attached buildings are therefore considered, with good approximation, in thermal equilibrium among them) belonging to the same Census Unit are aggregated into an entire conditioned built volume named the Buildings' Group.
To easily assess the total volume referred to each TTZ composing the built volume of each Census Unit, each Buildings' Group is converted into an equivalent parallelepiped volume. With reference to the dimensions of the TTZs, the number of floors and the number of thermal zones composing each Buildings' Group floor are calculated.
Then, based on the resulting ranges of number of thermal zones per floor and of number of floors, four possible configurations of the Buildings' Group have been defined with related TTZ compositions (Table 1). Then, based on the resulting ranges of number of thermal zones per floor and of number of floors, four possible configurations of the Buildings' Group have been defined with related TTZ compositions (Table 1).
Type of TTZ • Assessment of the use categories (B3).
In order to characterize the built volume based on use categories to which different usage patterns have to be associated, since the data from GCPH are aggregated at the Census Unit level, a percentage of volume by each use category has to be calculated and applied to the TTZs volumes of each Census Unit.
In detail, the residential volume has been calculated with reference to the surface of residential building units, the only dimensional data available in GCPH.
Then, the office built volume results from the following calculations: the residential built volume is subtracted from the total built volume of the Census Unit, in order to obtain the non-residential one, and the GCPH available data on the percentage of the number of office buildings with respect to the overall number of non-residential buildings is applied to the non-residential volume.
For georeferencing the thermal systems consistently with each census unit, the building addresses reported in the TSC have been associated to the address coordinates reported in the local Territorial Information System database [29] prior to a harmonization process of nomenclatures in both datasets.
Hence, based on the available data, a procedure for evaluating the percentage of buildings with the same thermal system type per each Census Unit is foreseen. For the residential buildings, the percentages of different heating systems are calculated based on the building units' heated surfaces, while for the space cooling, the percentage is simply referred to the presence of cooling systems in the building units (the only available data), Then, based on the resulting ranges of number of thermal zones per floor and of number of floors, four possible configurations of the Buildings' Group have been defined with related TTZ compositions (Table 1).
Type of TTZ • Assessment of the use categories (B3).
In order to characterize the built volume based on use categories to which different usage patterns have to be associated, since the data from GCPH are aggregated at the Census Unit level, a percentage of volume by each use category has to be calculated and applied to the TTZs volumes of each Census Unit.
In detail, the residential volume has been calculated with reference to the surface of residential building units, the only dimensional data available in GCPH.
Then, the office built volume results from the following calculations: the residential built volume is subtracted from the total built volume of the Census Unit, in order to obtain the non-residential one, and the GCPH available data on the percentage of the number of office buildings with respect to the overall number of non-residential buildings is applied to the non-residential volume.
For georeferencing the thermal systems consistently with each census unit, the building addresses reported in the TSC have been associated to the address coordinates reported in the local Territorial Information System database [29] prior to a harmonization process of nomenclatures in both datasets.
Hence, based on the available data, a procedure for evaluating the percentage of buildings with the same thermal system type per each Census Unit is foreseen. For the residential buildings, the percentages of different heating systems are calculated based on the building units' heated surfaces, while for the space cooling, the percentage is simply referred to the presence of cooling systems in the building units (the only available data), Then, based on the resulting ranges of number of thermal zones per floor and of number of floors, four possible configurations of the Buildings' Group have been defined with related TTZ compositions (Table 1).
Type of TTZ • Assessment of the use categories (B3).
In order to characterize the built volume based on use categories to which different usage patterns have to be associated, since the data from GCPH are aggregated at the Census Unit level, a percentage of volume by each use category has to be calculated and applied to the TTZs volumes of each Census Unit.
In detail, the residential volume has been calculated with reference to the surface of residential building units, the only dimensional data available in GCPH.
Then, the office built volume results from the following calculations: the residential built volume is subtracted from the total built volume of the Census Unit, in order to obtain the non-residential one, and the GCPH available data on the percentage of the number of office buildings with respect to the overall number of non-residential buildings is applied to the non-residential volume.
For georeferencing the thermal systems consistently with each census unit, the building addresses reported in the TSC have been associated to the address coordinates reported in the local Territorial Information System database [29] prior to a harmonization process of nomenclatures in both datasets.
Hence, based on the available data, a procedure for evaluating the percentage of buildings with the same thermal system type per each Census Unit is foreseen. For the residential buildings, the percentages of different heating systems are calculated based on the building units' heated surfaces, while for the space cooling, the percentage is simply referred to the presence of cooling systems in the building units (the only available data), Then, based on the resulting ranges of number of thermal zones per floor and of number of floors, four possible configurations of the Buildings' Group have been defined with related TTZ compositions (Table 1).
Type of TTZ • Assessment of the use categories (B3).
In order to characterize the built volume based on use categories to which different usage patterns have to be associated, since the data from GCPH are aggregated at the Census Unit level, a percentage of volume by each use category has to be calculated and applied to the TTZs volumes of each Census Unit.
In detail, the residential volume has been calculated with reference to the surface of residential building units, the only dimensional data available in GCPH.
Then, the office built volume results from the following calculations: the residential built volume is subtracted from the total built volume of the Census Unit, in order to obtain the non-residential one, and the GCPH available data on the percentage of the number of office buildings with respect to the overall number of non-residential buildings is applied to the non-residential volume.
For georeferencing the thermal systems consistently with each census unit, the building addresses reported in the TSC have been associated to the address coordinates reported in the local Territorial Information System database [29] prior to a harmonization process of nomenclatures in both datasets.
Hence, based on the available data, a procedure for evaluating the percentage of buildings with the same thermal system type per each Census Unit is foreseen. For the residential buildings, the percentages of different heating systems are calculated based on the building units' heated surfaces, while for the space cooling, the percentage is simply referred to the presence of cooling systems in the building units (the only available data), • Assessment of the use categories (B3).
In order to characterize the built volume based on use categories to which different usage patterns have to be associated, since the data from GCPH are aggregated at the Census Unit level, a percentage of volume by each use category has to be calculated and applied to the TTZs volumes of each Census Unit.
In detail, the residential volume has been calculated with reference to the surface of residential building units, the only dimensional data available in GCPH.
Then, the office built volume results from the following calculations: the residential built volume is subtracted from the total built volume of the Census Unit, in order to obtain the non-residential one, and the GCPH available data on the percentage of the number of office buildings with respect to the overall number of non-residential buildings is applied to the non-residential volume.
For georeferencing the thermal systems consistently with each census unit, the building addresses reported in the TSC have been associated to the address coordinates reported in the local Territorial Information System database [29] prior to a harmonization process of nomenclatures in both datasets.
Hence, based on the available data, a procedure for evaluating the percentage of buildings with the same thermal system type per each Census Unit is foreseen. For the residential buildings, the percentages of different heating systems are calculated based on the building units' heated surfaces, while for the space cooling, the percentage is simply referred to the presence of cooling systems in the building units (the only available data), which are all assumed as electricity-based multi-splits. For the office ones, different heating and cooling system percentages are calculated based on the sizes of the surveyed installed systems.
Moreover, in the case of Census Units with missing data, the average systems distribution among the surroundings Census Units is adopted.
Then, based on [30], typical mean thermal system efficiencies are associated to each Census Unit for each thermal system type.

Estimation of Building Stock Energy Profiles (C)
As an outcome, for each Census Unit associated to a period of construction, the built volume per each use category and TTZ is calculated and multiplied by the value of hourly energy density of space heating and space cooling needs simulated for the proper BEM to obtain the thermal energy profiles of the considered stock. Similarly, the hourly values of energy density for electric appliances and artificial lighting are multiplied by the built volume to obtain the urban electric energy profiles.
Finally, by multiplying the percentages of thermal system types by the thermal energy needs and dividing them by the associated efficiencies, the urban stock energy consumption profiles are determined.
In Figure 3, an example of the georeferenced used data (the polygons of Census Units, Buildings, the polygons of Built volumes composing the buildings, the polygons of Buildings' Groups, and the points of installed Thermal Systems in buildings referred to the address coordinates) is reported.
which are all assumed as electricity-based multi-splits. For the office ones, different heating and cooling system percentages are calculated based on the sizes of the surveyed installed systems.
Moreover, in the case of Census Units with missing data, the average systems distribution among the surroundings Census Units is adopted.
Then, based on [30], typical mean thermal system efficiencies are associated to each Census Unit for each thermal system type.

Estimation of Building Stock Energy Profiles (C)
As an outcome, for each Census Unit associated to a period of construction, the built volume per each use category and TTZ is calculated and multiplied by the value of hourly energy density of space heating and space cooling needs simulated for the proper BEM to obtain the thermal energy profiles of the considered stock. Similarly, the hourly values of energy density for electric appliances and artificial lighting are multiplied by the built volume to obtain the urban electric energy profiles.
Finally, by multiplying the percentages of thermal system types by the thermal energy needs and dividing them by the associated efficiencies, the urban stock energy consumption profiles are determined.
In Figure 3, an example of the georeferenced used data (the polygons of Census Units, Buildings, the polygons of Built volumes composing the buildings, the polygons of Buildings' Groups, and the points of installed Thermal Systems in buildings referred to the address coordinates) is reported.

Case Study
The city of Milan was the first case study context in which the procedure has been applied because it can be considered as representative of different urban contexts due to a mixed consistency of buildings and a variable building density (the ratio of built volume-to-land surface per each Census Unit ranges from 0.02 m 3 /m 2 to 163 m 3 /m 2 ) [28].
The assumption adopted for setting the BEMs for the case study of Milan are reported in the following.
For considering the occupants' activities and electric device usage, which influence both the internal heat loads and the electricity consumptions, the recommendations of the recent standard EN ISO 52000-1 [33] and subordinated ones, i.e., the ISO 17772:2017 (part 1 and 2, [34,35]) and the EN 15193:2017 [36], have been referred to. The same standard ISO 17772:2017 [35] has been considered to set the air change per hour (ACH) due to ventilation and infiltration. The space heating season length and the limited number of hours per

Case Study
The city of Milan was the first case study context in which the procedure has been applied because it can be considered as representative of different urban contexts due to a mixed consistency of buildings and a variable building density (the ratio of built volume-to-land surface per each Census Unit ranges from 0.02 m 3 /m 2 to 163 m 3 /m 2 ) [28].
The assumption adopted for setting the BEMs for the case study of Milan are reported in the following.
For considering the occupants' activities and electric device usage, which influence both the internal heat loads and the electricity consumptions, the recommendations of the recent standard EN ISO 52000-1 [33] and subordinated ones, i.e., the ISO 17772:2017 (part 1 and 2, [34,35]) and the EN 15193:2017 [36], have been referred to. The same standard ISO 17772:2017 [35] has been considered to set the air change per hour (ACH) due to ventilation and infiltration. The space heating season length and the limited number of hours per day have been defined based on the heating degree days (HDDs) for the city of Milan [37]. Conversely, since any national rule does not concern the cooling one, it has been assumed, according to the occupant's presence, in the rest of the year in the residential cases, and as usual, due to related high internal heat loads, in the whole year in the office cases. Furthermore, it has been taken into account that in the standard ISO 17772-1:2017 [35] comfort requirements are expressed in terms of operative temperature. The operative temperature parameter, in fact, can strongly influence the real building energy need, especially during summer when the solar radiation affects the glazed surfaces, and is commonly neglected in simplified building energy assessment, which considers only the air temperature. As a matter of fact, in the case of unfavorable radiant temperatures, the air temperature set-point is usually corrected by the users to adjust the indoor condition to compensate the radiative component, and the consequent overuse of the active climatization systems causes an unpredicted increase in building energy consumptions.
Considering this, operative temperatures of 20 • C for heating and 26 • C for cooling have been set as the indoor comfort temperatures.
Particularly, for more proper evaluation of residential building performances during summer, variable operative temperature values defined according to the adaptive approach and calculated for the city of Milan have been adopted from a previous study [38]. Moreover, considering that in the studied context, residential buildings are widely naturally ventilated and usually equipped with operable window and shading devices, a free cooling strategy in summer has been modeled in the related BEMs [38].
Hence, for the old 1960/80 as well as recent residential and office Typical Thermal Zones of BEMs, by adopting the related test reference year (TRY) of Milan available in the TRNSYS library, the energy density profiles of space heating need, space cooling need, and electricity demand have been simulated.

Results
The results of the overall procedure application to the case study of Milan are reported and discussed in the following subsection.

Urban Building Stock Characterization
For the selected case study of the city of Milan, based on information provided by the local TDb [39], the GCPH [26], and the local TSC [40], the UBEM has been implemented, and maps of the existing building stock characterized by the three main construction ages (i.e., use categories and TTZ volume, as well as installed system percentages in terms of residential building unit surface and office building thermal system size) have been generated.
It is noteworthy that the obtained results grasped the real features' distribution over the given urban area. In particular, as an example, Figure 4 shows the prevalence of the old building stock in the city center and some suburbs, i.e., formerly independent villages, as well as the widespread presence of the "building boom" (1960/80) stock throughout the whole urban area; Figure 5 shows the prevalence of TTZs placed in the corners of the buildings, thus indicating the prevalence of small buildings in the suburbs; Figure 6 clearly shows the prevalence of residential buildings throughout the whole urban area except for the city center and some districts dominated by office use; and finally, the distribution of gas-based boilers in residential buildings and of chillers in office buildings is shown in Figure 7.

Urban Building Stock Energy Profiles
The determined energy density profiles of each TTZ of all BEMs have been properly associated to the characterized built volume in GIS.
As an example of possible outputs, in Figures 8-14, maps of space heating hourly energy need in a winter workday; space cooling hourly energy need in a summer workday; electricity hourly demand for appliances and artificial lighting in a working day; natural gas, gasoil, and district heating hourly final consumptions for space heating in a winter day, respectively; and electricity hourly consumption at 9 am and 10 pm are reported

Urban Building Stock Energy Profiles
The determined energy density profiles of each TTZ of all BEMs have been properly associated to the characterized built volume in GIS.
As an example of possible outputs, in Figures 8-14, maps of space heating hourly energy need in a winter workday; space cooling hourly energy need in a summer workday; electricity hourly demand for appliances and artificial lighting in a working day; natural gas, gasoil, and district heating hourly final consumptions for space heating in a winter day, respectively; and electricity hourly consumption at 9 a.m. and 10 p.m. are reported per each Census Unit, differently colored based on the energy intensity ranges. Furthermore, the hourly final energy consumption profiles for space heating by each fossil fuel and electricity for space heating, equipment, and artificial lighting in a winter working day have been determined for a mixed-use district, as shown in Figure 15.

Urban Building Stock Energy Profiles
The determined energy density profiles of each TTZ of all BEMs have been properly associated to the characterized built volume in GIS.
As an example of possible outputs, in Figures 8-14, maps of space heating hourly energy need in a winter workday; space cooling hourly energy need in a summer workday; electricity hourly demand for appliances and artificial lighting in a working day; natural gas, gasoil, and district heating hourly final consumptions for space heating in a winter day, respectively; and electricity hourly consumption at 9 am and 10 pm are reported per each Census Unit, differently colored based on the energy intensity ranges. Furthermore, the hourly final energy consumption profiles for space heating by each fossil fuel and electricity for space heating, equipment, and artificial lighting in a winter working day have been determined for a mixed-use district, as shown in Figure 15.

Urban Building Stock Energy Profiles
The determined energy density profiles of each TTZ of all BEMs have been properly associated to the characterized built volume in GIS.
As an example of possible outputs, in Figures 8-14, maps of space heating hourly energy need in a winter workday; space cooling hourly energy need in a summer workday; electricity hourly demand for appliances and artificial lighting in a working day; natural gas, gasoil, and district heating hourly final consumptions for space heating in a winter day, respectively; and electricity hourly consumption at 9 am and 10 pm are reported per each Census Unit, differently colored based on the energy intensity ranges. Furthermore, the hourly final energy consumption profiles for space heating by each fossil fuel and electricity for space heating, equipment, and artificial lighting in a winter working day have been determined for a mixed-use district, as shown in Figure 15.

Validation
Considering the current public unavailability of energy data with resolution greater than the annual one (e.g., seasonal, monthly, hourly), the annual energy consumptions resulting from the defined procedure application have been validated against the regional energy balance database (SIRENA) [41]. SIRENA provides the annual energy consumption for each municipality for each single sector (agriculture, tertiary, residential, transports, industry) and carrier (fossil fuels, RES, electricity, and district heating) prior to application of top-down approaches on collected data from the energy companies. Average data among the years 2010 to 2012 were used as closed to the period of used data in the GIS-based procedure. Due to the different levels of detail, to compare the urban energy consumptions reported in SIRENA with those estimated with the procedure, some elaborations were necessary.
Concerning SIRENA, the share of electricity consumptions attributed only to private and public offices has been inferred, weighting the tertiary sector data based on the offices share of overall regional electricity consumptions coming from the National Distribution System Operator [42].
Concerning the energy consumptions estimated by means of the applied procedure, space heating and cooling values obtained starting from the dynamic simulation using the TRY have been normalized based on the mean HDDs of the same years, 2010 to 2012, measured at three urban weather stations of the Agency for Protection and Research of the Environment (ARPA) [43]. Moreover, the following annual energy consumptions have been added: -For the residential sector, the DHW one was assessed based on the typical residential data reported in [44], the cooking one was estimated based on the average data reported in a previous research of the national Agency for the New Technologies, Energy and Sustainable Economic Development (ENEA) [45]; and the electricity for

Validation
Considering the current public unavailability of energy data with resolution greater than the annual one (e.g., seasonal, monthly, hourly), the annual energy consumptions resulting from the defined procedure application have been validated against the regional energy balance database (SIRENA) [41]. SIRENA provides the annual energy consumption for each municipality for each single sector (agriculture, tertiary, residential, transports, industry) and carrier (fossil fuels, RES, electricity, and district heating) prior to application of top-down approaches on collected data from the energy companies. Average data among the years 2010 to 2012 were used as closed to the period of used data in the GIS-based procedure. Due to the different levels of detail, to compare the urban energy consumptions reported in SIRENA with those estimated with the procedure, some elaborations were necessary.
Concerning SIRENA, the share of electricity consumptions attributed only to private and public offices has been inferred, weighting the tertiary sector data based on the offices share of overall regional electricity consumptions coming from the National Distribution System Operator [42].
Concerning the energy consumptions estimated by means of the applied procedure, space heating and cooling values obtained starting from the dynamic simulation using the TRY have been normalized based on the mean HDDs of the same years, 2010 to 2012, measured at three urban weather stations of the Agency for Protection and Research of the Environment (ARPA) [43]. Moreover, the following annual energy consumptions have been added: -For the residential sector, the DHW one was assessed based on the typical residential data reported in [44], the cooking one was estimated based on the average data reported in a previous research of the national Agency for the New Technologies, Energy and Sustainable Economic Development (ENEA) [45]; and the electricity for shared use and spaces (e.g., artificial lighting in stairwells, elevators, circulation pumps, etc.) was estimated based on the data reported in [46]; -For the office sector, the electricity one for DHW, general services (e.g., elevator, circulation pumps, etc.), and external lighting was added based on the data reported in [46].
Hence, for the residential sector, a final energy consumption of electricity equal to 1819 GWh, i.e., 7.34% greater than the data from SIRENA (1694 GWh), and a primary energy consumption of fossil fuels equal to 7359 GWh, i.e., 18.7% greater than the data from SIRENA (6200 GWh), have been obtained. For the office sector, a final energy consumption of electricity equal to 1604 GWh, i.e., 6.19% lower than the data from SIRENA (1709 GWh), and a primary energy consumption of fossil fuel of 663 GWh have been obtained, revealing a proportion (72% and 28%, respectively) similar to the consumption shares (74% and 26%, respectively) reported for a set of surveyed offices placed in Northern Italy in [47]. These shares have been assumed for the fossil fuel consumption validations, not having alternative references for detailing the overall tertiary sector consumptions reported in SIRENA.
Therefore, also taking into account the uncertainties of the available data sources for the validation, the effectiveness of the defined procedure has been proven.

Conclusions
In the framework of urban energy transition towards smart technologies and RESbased energy systems, the need for accurate estimates of demand profiles is fundamental for ensuring a proper energy balance at hourly resolution.
To that end, a procedure for the urban building stock modeling towards accurate estimation of the energy demand profiles has been defined, fully achieving the purpose of the research. In detail, a geo-referenced procedure for volumetric building stock characterization, considering the main periods of construction, the most diffuse uses, and associated thermal systems based on data that are largely available over all of the Italian territory, was developed. Besides, for defined residential and office Building Energy Models, adopting different energy-related features, a matrix of hourly space heating, space cooling and electric energy density profiles for selected Typical Thermal Zones has been determined. By associating the simulated energy profiles of BEMs to the characterized building stock, it is possible to estimate the urban energy demand profiles and, prior to a spatial analysis of the installed thermal systems, the energy consumptions.
The method has been tested in the Italian city of Milan, for which maps of the characterized building stock and related energy profiles have been carried out as an example of the potential function of this tool in supporting energy policies. Energy consumption validation with the annual data coming from the urban energy balance returned acceptable discrepancies.
As a remark, the procedure is based on the elaboration of data from the Italian Topographic Databases under provision at the national level according to the INSPIRE European Directive, which calls for enhancing the harmonization and interoperability of spatial data across the Member States, as well as the national General Census of Population and Houses, whose used data are among those mandatorily required by Eurostat (the European Statistical Office).
The analysis of spatial distribution of the mapped buildings' energy-related features enables the identification of the least energy-performing districts towards the definition of retrofit strategies for buildings. Accordingly, by rerunning the procedure and adopting upgraded thermophysical performances for the BEMs, it is also possible to obtain energy profiles referring to improved energy scenarios and to evaluate the mismatch between energy production and demand, above all in the case of integration of unpredictable RESbased systems (e.g., photovoltaic panels, solar thermal collectors, micro-wind turbines) and storages. Moreover, the analysis of hourly demand can be useful to evaluate the need for promoting behavioral changes to optimize the energy use through load-shaping programs. In case the energy profiles are recorded through smart meters, the real profiles could be used for mapping the current energy consumption on an urban scale, while the BEMs, once simulation results are consistently calibrated, could be updated for investigating the effects of EEMs on the urban demand.
Along with this, the determined urban/district hourly profiles could be used as input data in the detailed energy planning software (e.g., Homer, EnergyPLAN, etc.) for properly investigating new energy production mix scenarios (e.g., integration of RES and storages, connection to district heating and cooling networks).
Further developments could regard the application of the procedure to other urban contexts for assessing the need of possible implementations in different climatic conditions.