WEB-BASED DECISION SUPPORT TOOL FOR BUILDING-INTEGRATED SOLAR PHOTOVOLTAIC SYSTEMS

A web-based multi-criteria decision support tool is designed to support the planning, control and deployment of building-integrated photovoltaic (BIPV) in the City of Cape Town, South Africa. Solar energy is one of the renewable sources for generating electricity by means of photovoltaic systems, and it offers a viable and expedient means of generating electricity within a short period of time. Nevertheless, there are some impediments to the extensive deployment of solar photovoltaic systems. The most prominent among these are generation potential and the high capital cost of initial set-up. Hence, the location, design and yield of building-integrated photovoltaic systems have to be well thought-out before their deployment. The interactive web-based tool designed utilises JavaScript and Hypertext Mark-up Language (HTML) to implement a map mashup, which can be queried to retrieve vital information about the solar photovoltaic potential of a building roof. From results generated and the system developed, it becomes possible to remotely and sufficiently evaluate buildings in the city in order to make decisions about solar photovoltaic potentials, designs and installations. * Corresponding author


INTRODUCTION
It is becoming more difficult to achieve sustainability and reduce ecological footprint in urban areas due to greater proportion of the world's population residing in cities and urban areas (UN Department of Economic and Social Affairs, 2013). Some of the United Nation's sustainable development goals centre on provision of clean energy and reduction of reliance on fossil fuels, which are the main cause of greenhouse gases (UN General Assembly, 2015).
Countries in Africa are experiencing massive urbanization and if they continue to rely on fossil fuels alone for power generation, the environmental consequences would be grievous (Saghir, Santoro, 2018). It therefore becomes important for African cities to chart a path to attain sustainability in terms of energy and climate, as its' continual survival depends on it. Most part of Africa is known to have abundance of sunlight and solar energy from the sun is known to be one of the largest sources of renewable and sustainable energy. Likewise, solar power offers the advantage of quick local implementation whilst fossil fuel, nuclear, etc. require large generation infrastructure, thus taking more time to implement.
The possibility of solar energy becoming a dominant source of energy is becoming more obvious by the day. Countries like China and United States have experienced rapid growth in solar power generation with China surpassing its 2020 solar panel target already (Smith, 2018). Likewise, solar energy is now gaining popularity in urban areas, as solar power is gradually becoming cheaper than coal in some part of the world. It is projected that solar energy would likely become the cheapest energy option in less than a decade (Shankleman, Martin, 2017). There have also been an increase in micro-scale building-integrated solar photovoltaic installations locally, thus providing relief from grid power requirements (Rycroft, 2017). This have the capacity of impacting the local economy positively by protecting businesses from power "black-outs".
Despite the viability of solar energy in meeting the energy needs of cities globally, there are some impediments (potential estimation, siting, building roof attributes, etc.) to the extensive deployment of building-integrated solar photovoltaic systems. As such, it is the aim of this study to develop a web-based tool, which can provide visual-aided information about the potential, siting and design of building-integrated solar photovoltaic system, thus aiding decision support. This decision support tool would not only proffer solutions to the impediments plaguing the extensive deployment of building-integrated solar photovoltaic system but also help to create awareness about the solar photovoltaic potentials.
In developing the web-based solution, some data layers such as building roof polygon and solar radiation raster are sourced from existing municipal datasets (CoCT, 2018) and analysed in a Geographic Information Systems (GIS) environment before deployment for use in the web-based decision support tool.

RELATED WORKS
Access and interaction with digital geographic information has been mostly limited to desktop computers, thereby making it hard for people without access to such computers and specialised program to view, access or interact with GIS outputs (Quinn, Dutton, 2017). Web mapping thus present an efficient and effective way of communicating map information to greater number of people. Earlier web maps were mostly static but now evolved into interactive and distributive web mapping (Li, et al., 2011). The traditional client-server technology still serves as the foundation for recent advancements in web mapping. Computing models in the client-server technology is dominantly software-defined, with the either side operating mostly on different software platform. Hence, a communication mechanism between the client and the server side are facilitated by defined set of standards such as Application Program Interfaces (APIs) and Remote Procedure Calls (RPC) (Karnatak, 2012). The advancements have prompted map mashups, by allowing developers and web map users to combine map data from different sources and formats to achieve customized web-GIS services (Li, et al., 2011).
Recent web mapping applications, which are JavaScript or Asynchronous JavaScript and XML (AJAX) based and implemented in Hypertext Mark-up Language 5 (HTML5) include Google Maps APIs, Leaflets, OpenLayers, MapBox API, ArcGIS APIs and Bing Maps API. While some are proprietary, others are open sources, both having its pros and cons. The more comprehensive their API documentation, the more popular the API (Wagner, 2015). These web mapping application also rely on service-oriented architecture like Service Oriented Access Protocol (SOAP), Representational State Transfer (REST) and JavaScript Object Notation (JSON) to receive map data from different distributive web services (Johansson, 2011).
Some existing web-based solar photovoltaic (PV) tools leveraged on the above APIs to present their capabilities. Existing tools include PV-GIS (Suri, et al., 2006), SolarGIS (Šúri, Cebecauer, 2010), PVWatts by National Renewable Energy Laboratory (NREL) United States. Most of these existing tools are coarse in resolution and therefore fail to address some factors impeding large scale deployment of building-integrated solar photovoltaic system. The framework developed in this paper is able to provide a fine scale resolution in terms of building roof sections and the solar radiation model.

FRAMEWORK DESIGN
A four-layered distributed system is designed following after the traditional client-server architecture to develop the webbased interactive building-integrated solar photovoltaic system tool. Figure 1 shows the conceptual framework for the development of the web-based interactive tool. The basic components the system is discussed below.

Data Layer Assessment and Validation
Data used in achieving the aim of this study were assessed and validated prior to the analysis.

Building Roof Outlines:
The building roof outline is an important part of the web-based tool development, as the information required for interaction and display are housed in its attribute table. The building roof outline data layer sourced from (Adeleke, 2018) and (CoCT, 2018) comes in two variations, one depicting the outline of each building roof and the other depicting the outlines of the planes that form the whole building roof.
The validation is carried out by overlaying the building roof outline data on the existing aerial imagery of the City of Cape Town, South Africa. The building roof outlines are found to be consistent with the boundaries of the building roofs on the aerial imagery.

Solar Radiation Estimate:
The solar radiation data forms an integral data in calculating the solar photovoltaic potentials. The solar radiation estimate sourced from (Adeleke, 2018) comes in a raster format and having a resolution of 60cm. The solar radiation estimates are validated by comparing them with real solar radiation data recorded at some weather stations within the study area.

Orientation (Aspect) Data:
The orientation of building roof planes are obtained by calculating the aspect, using the Digital Surface Model (DSM) of the Study Area. The orientation information forms part of the essential information required in determining the suitability and optimality of a particular building roof plane for solar panel installation.

Slope Data:
The slope angles are also calculated using the DSM in the GIS environment. Just as the Orientation information, the slope data is also vital in determining building roof suitability.

Street Address Data:
The street address data was obtained from the City of Cape Town municipality and comes as a point Shapefile. The street address data is essential in the web-based tool development in order to facilitate the search process. The street address data is validated by overlaying the point Shapefile on the aerial imagery to ascertain each point uniquely identifies each building.

Solar Photovoltaic Potential Estimation
Using these data above, a solar photovoltaic potential database is created, as depicted in Figure 2. To estimate the solar photovoltaic potential of the building roof, the following assumptions are contemplated:  It is possible to place solar photovoltaic tiles to occupy the entire building roof panel, spaces remaining are negligible and inconsequential.  Most building roof do not have objects hanging on top; thus, a theoretical photovoltaic potential is calculated for all building roof without factoring the spaces occupied by objects on the building rooftop.
The geographic potential, physical potential and the technical potential are all considered in calculating the solar photovoltaic potential of a building roof. The useful roof area represents the geographic potential, the viable solar radiation is the physical potential, whereas, the efficiency of the photovoltaic system represents the technical potential.
Firstly, the useful roof area is obtained by converting the roof span area to surface area using the equation below: Secondly, the solar radiation estimate for each building roof plane is obtained by overlaying the building roof outline over the solar radiation raster and carrying out zonal statistics to obtain the mean values of the pixels falling within each building roof plane.
The next step in estimating the solar photovoltaic potential is to determine the amount of energy exploited in converting the solar energy to electricity. Factors considered in determining the amount of energy exploited include the conversion coefficients i.e. performance ratio and the solar panel efficiency. Losses due to temperature, inverter, shading, dust, cables and other losses are taken care of by the performance ratio. The three factors stated earlier are combine using Equation 2 (Adeleke, Smit, 2016) to produce the solar photovoltaic potential.
Where PPTN = Photovoltaic potential (kWh) RSA = Roof surface area (m 2 ) SMR = Mean annual solar radiation (Wh/m 2 ) PE = Panel efficiency (%) PR = Performance ratio The parameters listed above are provided in columns of the building roof outline's attribute table. The solar potential calculation is also carried out within the environment of the attribute table, thus serving as a spreadsheet.

Web-based Solar Photovoltaic Tool Design
In order to make the web-based tool interactive, it is required that users would be able click on the published data-layer features to retrieve information stored in its attribute table. Also, to enrich the user experience, a query toolbox is designed (Figure 3), having checkboxes and buttons to interact with attributes of the published data layer and display solar photovoltaic potentials. The four-layered distributive system shown in Figure 1 would have three layers on the server side and one layer on the client side upon deployment. However, at the design stage, the application layer and data layer falls on the client side. The bulk of the processes occur on the server side with the application layer forming the focal point.

Service Layer:
Web services are often offered through Web APIs, which are defined interfaces that enable controlled communications via the HTTP between client and server. HTTP requests are sent using a Uniform Resource Identifier (URI) by clients and responses from the server are usually in the format of XML and JSON (Figure 4).

Figure 4. Web API data request and response
The Google Maps API (Google Maps, 2017) is adopted in this study as the map tiling service to provide a map backdrop for the interactive web-based tool.

Application Layer:
The application layer takes data from different distributed services and mash-it-up to create a customized web-based tool. Components utilised under the application layer as shown in Figure 1 include HTML, JavaScript and Apache. An HTML document is written with script tag (<script>) to contain the JavaScript codes used to make calls to the service layer (Google Maps API). The Apache HTTP server project helps in creating a web server on the computer workstation.

Usage layer:
This layer represents the computing unit through which individuals are able to access the web-based tool by typing the HTTP address on the browser and the web page is returned. The user can then interact with the web-based tool to obtain the desired information about building-integrated solar photovoltaic potentials.

PROTOTYPE DEVELOPMENT
The building roof outline layer serves as the database containing all the required information about the solar photovoltaic potentials. The layer is then converted to JSON file format in preparation to be overlaid on the base map. The HTML script serves as the background application that connects and combines the building roof outline data with the service layer to deliver the web-based solar photovoltaic tool.
Division elements are created within the HTML script for each division object such as the map, legend, checkboxes, query tool, etc. These division elements are uniquely identified to allow actions and results from JavaScript calls to be referenced appropriately. This facilitates object display and interaction. The web-based tool design is implemented having the following features, tools and functions:

Base Map and Layers
The map object is anchored to the division element created for it and it is declared a global variable so that the map object can be referenced in other places outside the map initialize function. Scripts are then written to overlay the building roof outline data layer, which contains the solar photovoltaic database. A jQuery AJAX function is then used to request the JSON file format of the building roof outline. This is then styled in various colours to reflect the direction (orientation) each roof plane is facing as shown in Figure 6. At this stage, the essential objects have been added, however, the web-based tool remains static with little or no interaction.

Layer Control and Legend
The essence of creating the tool is to disseminate information to users and facilitate interactivity. Therefore, JavaScript functions are added to make the web page interactive. A toggle is written to switch between layers using checkboxes. This would facilitate the ability to display a single layer and click on each feature to retrieve information. Subsequently, event functions are created, so that when any feature within a layer is clicked, it would popup an information window, which displays pre-set information from the attribute table of the layer feature.
Functions are also added to style layer features as the mouse moves over the layer feature. Also, other interactivity functions are added, such as zooming into features when clicked. A legend is also created and placed at the bottom-right of the web page to aid interpretation of the map features.

Query Tool
In order to make interaction and information extraction richer and user friendly, JavaScript functions are written to activate the designed query toolbox. An important element of the query tool is the local autocomplete search bar ( Figure 5). By typing street addresses and clicking the search button, the building roof outline of that address is zoomed into and a popup is triggered.
The popup displays information about the solar photovoltaic potential of that building roof. This is made possible by writing a jQuery AJAX function to request and return the address field of the building roof outline layer. Other elements of the query toolbox, such as the checkboxes and radio buttons are all tied to the "Submit Query" button. When this button is triggered, the solar photovoltaic potentials of the building selected via the address bar is displayed on the query tool dashboard as shown in Figure 6.
A click function is written and anchored to the "Submit Query" button, using conditional statements. If the street address typed into the address bar matches with the address value in the street address field of the roof outline layer, then it returns the requested information about the solar photovoltaic potentials of that building roof.

Web Server
A web server is created on the computer workstation to store all the components used in creating the web-based tool, such as the HTML document, building roof outline data layer, etc. The server is installed by creating a root folder on the workstation "C" drive, the Apache executable file is invoked from the command prompt to start the server and Apache service. The configuration file is then edited to reflect the server root, the workstation IP address and the port that the server would listen to.
Once the web server is correctly set up, the HTML document file and the referenced files are transferred to the document folder of the server. A client from the usage layer can then interact with the web-based system by typing the HTTP address on his browser and the index.html page would be returned, which is the interactive web-based decision support tool.

Discussion
Efforts and analysis put into generating information become a waste of time and resources, without a proper and adequate way of disseminating the information. Consequently, it is important to make information broadly available by deploying it on the web. The JavaScript codes contained within the HTML document are used in rendering the visualization and querying the published data layers in order to obtain the desired information about solar photovoltaic potentials.
The HTML document and the JavaScript codes used in this study can be easily adapted for use on other web map APIs that are JavaScript based. Most web map APIs available use similar API code structure. The only focal point of departure would be to replace the JavaScript source code links and the CSS stylesheet links in the HTML header element. Therefore, there is an opportunity to switch between various web map APIs.
Results generated from this study could be utilised as a decision-making tool by public authorities, such as the municipalities, as well as the private sector in assessing and determining which building roof would be viable for solar photovoltaic installations. The information generated by this study and made available through the interactive web-based tool, would make it possible to remotely evaluate various types of building ranging from commercial to residential in terms of its suitability for solar photovoltaic installations.
Consequently, contributing hugely to meeting goal seven (7) of the United Nations sustainable development goals, which is to "ensure access to affordable, reliable, sustainable and modern energy for all".

CONCLUSION
This paper aims to present solutions to impediments facing the large-scale deployment of building-integrated solar photovoltaic system. This is achieved by creating a web-based tool that would aid the decision-making process involved in deploying solar photovoltaic system on building roofs.
Processes involved include obtaining building roof outlines and solar radiation estimates over the building roof. The solar photovoltaic potentials are calculated and added as attributes to the building roof outline layer, together with ancillary data such as street address, slope, aspect, etc. to achieve a solar photovoltaic potential database. Subsequently, the database is deployed online using the designed four-layered distributed architecture, yielding an interactive web-based tool.
With the solar photovoltaic potential information made available online, the general public is able to remotely access information by simply typing the building street address to retrieve the amount of electricity that could be generated from the building roof among other information that could help in making decisions about building-integrated solar photovoltaic system. This would have been impossible in a situation where the solar potential information is sitting in a desktop GIS, as the user would require extra training to be able to operate a GIS software.
The results and information generated from this study offer an effective solution, given the planning complexities involved in the widespread deployment of building-integrated solar photovoltaic systems. Ignoring or avoiding this necessary stage of assessment and evaluation would result in a significant loss of time and resources.