A WEBGIS FOR THE KNOWLEDGE AND CONSERVATION OF THE HISTORICAL WALL STRUCTURES OF THE 13-18 CENTURIES

The presented work is part of the research project, titled "Tecniche murarie tradizionali: conoscenza per la conservazione ed il miglioramento prestazionale" (Traditional building techniques: from knowledge to conservation and performance improvement), with the purpose of studying the building techniques of the 13 18 centuries in the Sardinia Region (Italy) for their knowledge, conservation, and promotion. The end purpose of the entire study is to improve the performance of the examined structures. In particular, the task of the authors within the research project was to build a WebGIS to manage the data collected during the examination and study phases. This infrastructure was entirely built using Open Source software. The work consisted of designing a database built in PostgreSQL and its spatial extension PostGIS, which allows to store and manage feature geometries and spatial data. The data input is performed via a form built in HTML and PHP. The HTML part is based on Bootstrap, an open tools library for websites and web applications. The implementation of this template used both PHP and Javascript code. The PHP code manages the reading and writing of data to the database, using embedded SQL queries. As of today, we surveyed and archived more than 300 buildings, belonging to three main macro categories: fortification architectures, religious architectures, residential architectures. The masonry samples investigated in relation to the constr uction techniques are more than 150. The database is published on the Internet as a WebGIS built using the Leaflet Javascript open libraries, which allows creating map sites with background maps and navigation, input and query tools. This too uses an interaction of HTML, Javascript, PHP and SQL code.


INTRODUCTION
The presented work is part of the "L.R. n. 7/2007 Promozione della ricerca Scientifica e dell'innovazione tecnologica in Sardegna" (Regional Law 7/2007 -Promotion of scientific research and technological innovation in Sardinia) research project, titled "Tecniche murarie tradizionali: conoscenza per la conservazione ed il miglioramento prestazionale" (Traditional building techniques: from knowledge to conservation and performance improvement), with the purpose of studying the building techniques of the 13 th -18 th centuries for their knowledge, conservation, and promotion.The end purpose of the entire research project is to improve the performance of the examined structures on both the structural and the energetic use sides.The study, indeed, is founded on a multi-disciplinary approach involving several specialists integrating their expertise and providing their input to the knowledge of the dimensional, technical-constructive, mensio-chronological, material, physical-mechanical and energy-performance features in order to define the peculiarities and behavior of the examined structures, their performance levels, and then direct the interventions toward innovative, mindful and ethically correct solutions.All data acquired in the distinct steps of the research have been organized in a geo-topographic Database and a WebGIS, built according to the standards and specifications of the Regione Sardegna (local autonomous government of Sardinia) and CISIS (Italian inter-regional center for GIS and statistical services) which in turn are based in the INSPIRE directive specifications.The geo-topographic database can be integrated in the SITR (Regional Geographic Information System) and in the Regione Sardegna Web geoportal.This infrastructure was entirely built using Open Source software.The work consisted of designing a database built in PostgreSQL and its spatial extension PostGIS, which allows storing and managing of feature geometries and spatial data.The data input is performed via a form built in HTML and PHP.The HTML part is based on Bootstrap, an open tools library for websites and web applications.The implementation of this template used both PHP and Javascript code.The PHP code manages the reading and writing of data to the database, using embedded SQL queries.The database is designed to store and manage data building in order to turn them into comparable information and to make them available in single or aggregate form.The database structure is based on two levels of detail: the first one consists in a territorial census of artifacts to the architectural scale; the second one, however, is oriented to investigate technological specificity relative to the structural elements, with indications on the energy performance related thereto, to masonry construction techniques and to the window fixtures.The structure of the DB is organized in schemes.Each scheme represents a specific architectural typology of the building and contains several tables pertain to the different input categories for each data type.Until now, we surveyed and archived more than 300 buildings, belonging to three main macro categories: fortification architectures, religious architectures, residential architectures.The masonry samples investigated in relation to the construction techniques are more than 150.The Database is accessed in QGIS via a PostgreSQL connection, with the ability to import, export and modify the DB tables.A number of queries for interrogating the DB have also been built in QGIS.The database is published on the Internet as a WebGIS built using the Leaflet Javascript open libraries, which allows to create map sites with background maps and navigation, input and query tools.This too uses an interaction of HTML, Javascript, PHP and SQL code.The GIS files were predisposed for their eventual publishing on the official GIS of the Autonomous Region of Sardinia (SITR).

Data types
Building an effective tool for cataloging, systematizing and managing information collected through the direct and indirect data acquisition phases has been critical considering the amount and heterogeneity of the data to be taken into consideration in the research in question.The multifaceted nature of Sardinian architectural heritage, whose complexity is also a consequence of stratification and transformation over time, forms a mosaic of knowledge greatly articulated in qualitative and quantitative terms.For this reason, the database is designed so that it can collect the data produced, transform them into comparable information and finally make them available in a simple or aggregate form.The design of such a system of storage and management has highlighted, since the beginning, the need to have an immediate geographical overview that can be visualized through effective cartographic representations.The structure of such apparatus is based on two levels of depth: the first being a survey of the constructions on the territory at the architectural scale; the second, directed toward inspecting the technological peculiarities of the structural elements, giving indications about the energetic performance due to them, the construction techniques, and at the window fixtures.The first step in building the database consisted in the definition of a hierarchy of data types, subsequently parametrized through the definition of coded values, in order to make the acquired information easily comparable.A particular care was given to the ability to make the tool interoperate with the already existing national and regional databases.Still, the information layers were defined taking into consideration the homogeneity of the data acquired for the examined items; this is necessary in order to have an organic interpretation of the whole system, through the interrelation of information coming from different cultural scopes, emphasizing once again the interdisciplinary aspect of this research.The tool was also designed to be simple and modular, so as to be easily implemented and deployed, even in a partial state, as the information from the different disciplines progressively come in.For some data types, we built predefined dictionaries, with the possibility of integrating them with new items as the research progresses.Defining closed dictionaries is necessary in order to extrapolate meaningful thematic maps from the GIS.In further detail, the data were divided in 4 macro-categories: -"Unità architettonica" (Architectural Unit) -"Struttura" (Structure) -"Infisso" (Window Fixture) -"Campione murario" (Masonry Sample) The Architectural Unit macro-category contains the data pertaining to the name, location (with georeferencing), function, cultural and chronological dating, legal status and restrictions, stratigraphy and conservation, including all the previous restorations.The Structures macro-category contains the data pertaining to the distinct structures that form the architectural unit, in particular the typology of the structure (covers, walls, slabs), the static type (load-bearing or not), the constriction technique and the energetic efficiency.The Window Fixtures macro-category contains the data pertaining to the architectural unit's window fixtures, their dimensions and materials, and their overall energy transmittance.The Masonry Sample macro-category contains the data pertaining to the construction elements of the architectural unit and in particular their position, chronology, survey, restitution, wall structure, materials used (stone, cement, brick), and examinations performed.

Database design and implementation
The database was designed and implemented using PostgreSQL (https://www.postgresql.org),a relational DBMS distributed under a BSD license.The spatial functions of the database were provided by the PostGIS extension (http://www.postgis.org),distributed under GPL license.This extension turns the DBMS into a geodatabase by adding functions and data types that can manage geometries and reference systems.Data queries are performed using SQL (Structured Query Language), the standard language for data extraction in relational databases.SQL is used to create and edit database schemas, input and edit data, in addition to querying.The management of the database was done using the pgAdmin graphical interface (https://www.pgadmin.org).The database is structured in schemas and tables.Each schema contains multiple tables, in order to organize the tables into cohesive themes.(fig. 1) The schemas created in the DB are "decodifica", "campione_murario", "infisso", "struttura" and "unita_architettonica".Each schema contains the tables pertaining to a single input form.(fig.2, 3, 4, 5, 6) The "decodifica" scheme contains the tables of the domains used in the input forms, such as the municipalities and provinces of Sardinia.Some fields of the input forms have closed dictionaries in order to prevent misspellings and variant spellings, which would make queries impossible.The users can input and edit data through the forms created for the applications.These forms, implemented in PHP (PHP: Hypertext Processor, a server-side scripting language), retrieve data from the database tables with built-in queries.The PHP web client creates variables that are instanced from the values input in the form: <select type="text" class="form-control" name="livello_ricerca" id="livello_ricerca"> This line exemplifies how the PHP variables are linked to the HTML form.The value of the variable "livello_ricerca" (in bold) will be used.

.'">'.$myrow['valore'].'</opti on>'; } ?> </select>
In this case the value to be input in the form is chosen from the dictionary implemented in the table "livello_ricerca" in the schema "decodifica".In order to pass the value input into the form to the DB insertion query we have defined a variable:

Example: INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, …);
The input form was implemented in HTML5 using a free template from Bootstrap (https://getbootstrap.com), a repository of free tools for creating web sites and applications.The graphical appearance is defined in CSS, and Javascript was used to implement navigation and some controls.In addition to the input forms, there is the possibility of querying the surveyed assets.For now, the query consists in selecting a specific asset and obtaining the related tables.Every architectural unit is related to a structure form, a window fixture form and a masonry sample form through the "ID Bene" attribute.This allows to select all records related to a specific architectural unit.At the present time the database contains the data of over 300 architectural units belonging to three main categories: military, religious and civil-residential.The construction samples examined on the architectural units, regarding the constriction techniques, are over 150.The survey, as mentioned, used a multi-disciplinary approach involving different areas of expertise such as history and architecture, materials, restoration, construction techniques, physics and mechanics, and so on, and was performed by multiple researchers who contributed to populate the database with their data.The Database can be accessed in QGIS via a PostgreSQL connection, with the ability to import, export and modify the DB tables.A number of queries for interrogating the DB have also been built in QGIS.

WEBGIS DESIGN AND IMPLEMENTATION
The project involved, beyond the design and implementation of the geodatabase, the design and implementation of a WebGIS following the specifications of the Open Geospatial Consortium (OGC), the international organization that defines standards and technical specifications for localization and geospatial services.The OGC is formed by over 280 members (governments, companies, universities) with the purpose of developing and implementing open and extensible standards for the geographical data and their interchange and distribution.The specifications defined by the OGC are public (PAS) and freely available.The OGC maintains more than 30 standards, including: The WebGIS was designed to georeference the assets contained in the geodatabase, as mentioned before.The input form requires the coordinates of the asset in the ETRF2000 datum.Every GIS database table is characterized by a geometry field.The geometry is created by a GIS software when a new record is added, or when the coordinates of a point or vertex (of a polyline or polygon) are modified.In the WebGIS designed in this research, the coordinates of the point are required in the input form (fig. 7) but the input query does not populate the geometry field.Instead, a trigger updates the geometry field of the architectural unit table (fig.8).A trigger is a construct that signals the database to execute a particular function every time a certain operation is performed.In this case, the trigger is activated when a new record is input using the asset form, and compiles the geometry field using the coordinates submitted in the form.The WebGIS does not publish the tables directly from the PostgreSQL database, but through the GeoServer (http://geoserver.org)open source WebGIS server, which connects to the database and serves the data as a WMS service.GeoServer can also provide other OGC services such as WMS and WCS.The Web side of the GIS was implemented in HTML using Leaflet (http://leafletjs.com), an open source Javascript library for mobile-friendly interactive maps.The WebGIS was designed to leave the most possible screen space to the map itself, limiting the navigation tools to the strict minimum.It also includes a list of visible layers and a search tool for querying the WMS services.
The base maps of the WebGIS (fig.9) are the orthophoto mosaic of 2017 from the Regione Sardegna, and the Open Street Map base map.The two maps are alternately visible with the layer control.Other layers can be activated using the same control.

CONCLUSIONS
The work presented here is an integral part of a multidisciplinary research project for the study of buildings made in Sardinia between the 13 th and 18 th century.The purposes for the design and implementation of the database and the WebGIS were to have an infrastructure for collecting the large amount of data retrieved in the various phases of the research, and to allow users to perform queries both on the data and on the geospatial component.The data collection process involved specialists in several disciplines, such as historians, conservators, surveyors, structural engineers, petrographists, and experts of the thermal and hygrometric properties of wall structures; each of them surveying and studying for their part the characteristics of the historical buildings of Sardinia in order to populate the database.Indeed, this multi-disciplinary approach is the main strength of this infrastructure, which may become a very useful tool to reach a complete knowledge of the historical structures and contribute to define methods and techniques supporting the maintenance, conservation, consolidation, promotion and static an energetic improvement of the structures, based on the precise knowledge of the chemical, physical and mechanical behavior of the studied elements, and also respectful of the authenticity of the historical matter, and thus informed to principles of reversibility, distinguishability, authenticity, least intervention, and compatibility.