# SPAN: Solar Potential Analyzer

This is an open-source plugin for QGIS that provides an efficient approach for estimating the photovoltaic (PV) potential of individual buildings, based on point cloud data. The plugin is capable of processing various scales, from single buildings to city-scale analysis.

## Overview

Decentralized solar PhotoVoltaic (PV) is considered one of the most promising energy sources for cities and individuals aiming for energy self-sufficiency. Rooftop surfaces, in particular, offer great potential for rooftop-mounted PV systems. However, accurately estimating the PV potential of individual buildings is a challenging task that involves considering several parameters, such as meteorological factors, panel technology, geographical location, available roof surface area, surface azimuth, and tilt angle.

To address this challenge, we have developed an efficient approach that utilizes point cloud data to estimate the PV potential of roof surfaces. Our method leverages the PVGIS database and is capable of providing estimates at daily, monthly, and annual periods for more accurate results. Additionally, we have created a flexible and easy-to-use open-source plugin based on the QGIS software. This plugin enables users to estimate the PV potential of every roof surface and facilitates rooftop-mounted PV potential estimation.

## Features

- Estimation of photovoltaic potential for individual roof surfaces
- Utilization of point cloud data for accurate estimation
- Integration with the PVGIS database for improved results
- Support for estimation at daily, monthly, and annual periods
- Flexible and user-friendly interface within QGIS software
- Suitable for various scales, from single buildings to city-scale analysis

## Installation

### Installation via QGIS Repository

1. Open QGIS software.
2. Navigate to the Plugins menu.
3. Select "Manage and Install Plugins..."
4. In the Plugins dialog, click on the "Settings" tab.
5. Ensure that the "Show also experimental plugins" option is enabled.
6. Go back to the "All" tab.
7. Search for "PV Potential Estimation" in the search bar.
8. Click on the plugin when it appears in the search results.
9. Click the "Install plugin" button to install it.
10. Once installed, you can access the plugin from the Plugins menu.

### Installation via GitHub Repository

1. Navigate to the Plugins menu.
2. Select "User Profiles > Open Active Profile Folder"
3. In the Plugins dialog, click on the "Settings" tab.
4. Go to "python > plugins" folder
5. Paste all files in this repository into the folder
6. Restart the QGIS
7. You can access the plugin from the Plugins menu.

## Usage

1. Open the SPAN plugin from the Plugins menu.
2. Load your point cloud data into SPAN (las,laz or txt format).
3. Select the desired parameters, such as point cloud coordinate system, panel technology, system loss etc.
4. Click the "Estimate" button to calculate the PV potential for each roof surface.
5. The estimated PV potential will be displayed in the results tab.
6. You can export PV potential results in various formats (xlsx, json).

## Validation and Results

We conducted tests on 80 buildings selected from the ROOFN3D dataset to validate the proposed approach. The results showed an overall accuracy of 84% and an F1 score of 0.92, indicating the effectiveness of the method in estimating the PV potential of roof surfaces.

## License

This plugin is released under the [insert license name] license. For more information, please refer to the LICENSE file.

## Contributions

Contributions to the SPAN plugin are welcome. If you encounter any issues, have suggestions, or would like to contribute to its development, please visit the [GitHub repository] for more information.

## Citation

If you use the SPAN plugin in your work, please cite the following article:

> Özdemir, S., Yavuzdoğan, A., Bilgilioğlu, B. B., & Akbulut, Z. (2023). SPAN: An open-source plugin for photovoltaic potential estimation of individual roof segments using point cloud data. Renewable Energy, 119022. doi:10.1016/j.renene.2023.119022