Detailed descriptions of the building envelope are essential for robust urban-scale energy performance analyses, yet the data that cities actually hold rarely contain what modelers need. National energy certificate databases in Spain and other countries often lack key attributes such as orientation-specific external perimeter measurements and glazing ratios, and cadastral records generally stop at built area and compactness. A team at the University of A Coruña has now introduced UrbanFormAnalyzer, an open-source Python library developed with QGIS, the leading free geographic information system, which automatically derives orientation-specific external perimeters and additional envelope descriptors from cadastral geometries. The work, published in Computational Urban Science, addresses a gap that has long reduced the reliability of energy modeling, certification, and renovation planning.
The motivation is straightforward. Attributes such as wall materials, orientation-specific perimeters, and glazing distribution determine how buildings interact with their environment, influencing thermal losses, solar gains, and ultimately heating and cooling demands. Without harmonized data on these descriptors, the reliability of energy modeling, certification, and renovation planning is significantly reduced. In Spain, energy performance certificates rarely report orientation-specific external perimeters, and glazing ratios are provided only in specific autonomous communities, such as Madrid and Andalusia, but not in others, such as Galicia. Comparable shortcomings have been documented in the United Kingdom, France, and Denmark, and the methods used to determine energy consumption vary across countries, further limiting comparability.
UrbanFormAnalyzer tackles the problem in two stages. The workflow establishes a standard input structure to support integration with varied cadastral sources, and as a reference example the authors offer an adapter for the Spanish Cadastre that downloads and preprocesses its KML files, converting them into the required format. The Spanish cadastre provides two complementary datasets: KML files contain the richest information, including attributes for individual dwellings and commercial units, but are distributed one by one and can be incomplete, corrupted, or inconsistently formatted, while bulk-download Shapefiles cover entire study areas but only provide two-dimensional building footprints. Using both sources together is essential, since Shapefiles ensure that all buildings are accurately represented on the map while KML files supply the detailed attributes required for descriptor extraction. The adapter loads and reprojects the files, aligns polygon attributes with the required schema, replaces corrupted geometries with two-dimensional footprints, removes underground floors, merges everything into a single GeoPackage, and assigns consistent floor indices.
The spatial processing stage then calculates the perimeters by cardinal orientation, distinguishing exposed from adjacent walls. Building polygons are converted into boundary lines and decomposed into single, planar wall segments, each assigned an azimuth, its horizontal orientation measured clockwise from north. For each segment, two short perpendicular probes are generated on opposite sides, and segments whose probes do not intersect any other building geometry are classified as fully exterior façades. Walls adjacent to neighboring buildings with lower floors are identified by comparing floor levels, so partially exposed walls are also captured. Each wall segment is categorized into one of eight orientations, north, northeast, east, southeast, south, southwest, west, and northwest, and segment lengths are summed by orientation. The algorithm also computes the total interior perimeter, which refers to wall segments shared between adjacent units at the same floor level, the dominant orientation, and two-dimensional compactness.
To assess the reliability of the extracted descriptors, the team conducted a validation experiment based on manual inspection of a representative building sample. A building block in Madrid was selected because it exhibits a heterogeneous structure, including multiple floors, varied unit usages, adjacent constructions, interior courtyards, terraces, and geometric variations. Three units were examined in detail: a ground-floor commercial unit with significant adjacency, an intermediate residential floor combining exterior façades and shared walls, and a top-floor residential unit with predominantly exterior walls and curved segments. Exterior walls were visually identified and measured using the official Spanish Cadastre viewing tools, which introduce an expected error of approximately ten centimeters, and the manual results were compared with the automated outputs.
The comparison showed a very high level of agreement between the manual measurements and the automated outputs across all evaluated cases, including regular layouts and more complex geometries such as curved or partially shared façades. Minor discrepancies were primarily due to the manual nature of the validation process and small geometric simplifications in the cadastral data, and these differences do not significantly affect the aggregated perimeter values. The authors note that the validation is based on a limited number of units, although the selected cases were designed to cover structurally diverse scenarios commonly found in urban environments, and a large-scale manual validation would be desirable but is not feasible given the tools available.
To illustrate a potential downstream application, the enhanced datasets were matched with national energy certificates to explore the estimation of orientation-specific glazing ratios, where such data are available. The case study used processed cadastral data from the cities of Madrid and Seville as well as the entire province of Cadiz, regions selected for their high volume of available EPC information, ease of data access, and representativeness. Because the EPC database is available at the provincial level whereas the cadastral data mostly corresponds to capital cities, a large proportion of EPC records fall outside the spatial extent of the cadastral data. On average, 92.3 percent of EPC records are excluded, primarily due to this spatial mismatch, and the exclusion of incomplete cadastral geometries during preprocessing further reduces coverage; in Cadiz, the number of valid building-level references decreased from 202,189 to 139,780, in Madrid from 109,483 to 106,171, and in Seville from 59,983 to 16,246.
Despite these constraints, the scale of the datasets involved is considerable, with over 4.9 million cadastral units and more than 1.2 million EPC records across the three case studies. Following the matching process and filtering steps, the team obtained approximately 200,000 valid samples for model training. Comparisons of key variables across matched, unmatched, unregistered, and left-out groups showed that distributions remain broadly consistent, indicating that the matching process preserves the structural composition of the cadastral dataset. The predominant segments of the building stock, medium-sized multi-dwelling residential units of 50 to 100 square meters and buildings constructed between the 1970s and 2000s, are consistently represented across all groups.
The predictive exercise used a two-step process. First, a Gradient Boosting Classifier discerned whether a window is present on a given orientation; second, an Extreme Gradient Boosting Regressor quantified the window-to-wall percentage proportion if the classification was positive. All model training and evaluation were performed using a robust 5-fold cross-validation approach. The classification results were generally strong, with an average accuracy of 0.89, an average F1-score of 0.83, and an average ROC AUC of 0.96 across all orientations, indicating that the orientation-specific external perimeter is a highly informative feature for detecting the presence of windows. An ablation study confirmed this: removing the geometric descriptors dropped average accuracy to 0.52, the F1-score to 0.47, and the ROC AUC to 0.65.
The regression stage, which predicts the window-to-wall percentage conditional on the presence of glazing, achieved more modest performance, with an average Mean Squared Error of 196.80, an average Mean Absolute Error of 10.22, and an average R-squared of 0.26. The residual distribution reveals a systematic limitation, with errors widespread across the entire target range, forming a diagonal pattern indicative of consistent under-prediction for high values and over-prediction for low ones, reflecting a general regression bias and limited predictive capacity. While predictive accuracy remains limited, the case study highlights how UrbanFormAnalyzer could support the creation of reproducible and harmonized building envelope data suitable for a range of analytical applications, including large-scale energy modeling, planning, and renovation assessment. Future work will focus on developing additional national cadastral adapters, extending the tool’s functional scope to metrics such as the external obstruction angle and sky-view factors, and extending the analysis into three dimensions using sources like LiDAR or photogrammetry to derive true three-dimensional façade areas and window-to-wall ratios.
Subject of Research: An open-source workflow that derives orientation-specific building envelope attributes from cadastral data for urban energy analyses.
Article Title: UrbanFormAnalyzer: an open-source workflow to derive orientation-specific building envelope attributes from cadastral data
Article References: Garcia-Gonzalez, D., Rodríguez-Álvarez, J., Luaces, M. R., & Ladra, S. (2026). UrbanFormAnalyzer: an open-source workflow to derive orientation-specific building envelope attributes from cadastral data. Computational Urban Science, 6(1), Article 60. https://doi.org/10.1007/s43762-026-00288-z
Image Credits: AI Generated
DOI: 10.1007/s43762-026-00288-z
Keywords: UrbanFormAnalyzer, cadastral data, building envelope, orientation-specific perimeters, glazing ratios, energy performance certificates, QGIS, urban energy modeling, open-source Python library, Spanish Cadastre, building stock, predictive modeling
Cite Scienmag News
Denise Maddox. (October 28, 2026). Open-source tool turns cadastral maps into orientation-specific building envelope data for urban energy modeling. Scienmag. https://scienmag.com/open-source-tool-turns-cadastral-maps-into-orientation-specific-building-envelope-data-for-urban-energy-modeling/
Denise Maddox. "Open-source tool turns cadastral maps into orientation-specific building envelope data for urban energy modeling." Scienmag, 28 October 2026, https://scienmag.com/open-source-tool-turns-cadastral-maps-into-orientation-specific-building-envelope-data-for-urban-energy-modeling/. Accessed 28 October 2026.
Denise Maddox. "Open-source tool turns cadastral maps into orientation-specific building envelope data for urban energy modeling." Scienmag. October 28, 2026. https://scienmag.com/open-source-tool-turns-cadastral-maps-into-orientation-specific-building-envelope-data-for-urban-energy-modeling/








