Skip to content

PrasadiSenadeera/MCDM-for-solar-farm-siting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automation of multicriteria evaluation for solar farm siting using open source software

Abstract

Together, multicriteria evaluation (MCE) and geographic information systems (GIS) are usually concerned with allocating favorable lands to a particular purpose. This can be achieved by scoring and assigning weights to attributes of interest to decide whether certain areas are suitable or unsuitable for a particular activity. The objective of this study is to automate the preprocessing steps used for multicriteria evaluation that determines site suitability of solar farms using a GIS, allowing user input derived from Analytical Hierarchy Process (AHP).

Introduction

Multicriteria evaluation and GIS can be used to define site suitability for many applications. Multicriteria evaluation in a GIS is concerned with allocating land that hold favorable properties represented by attributes to suit a particular purpose or objective. It combines data in vector and raster formats to eventually assign them weights, usually decided through Analytical Hierarchy Process (AHP). AHP requires consulting with experts for environmental decision-making and is often used to define the weights in multicriteria evaluation depending on the favorability of each of the attributes.

Once AHP is conducted and the data layers have been decided, there is a systematic process that prepares the variables for aggregation through scoring and weighted overlay. This systematic process is necessary, but it is very time consuming. The objective of the study is to automate the data layer preprocessing creating one raster file that can be analyzed in open source software. An interface will be developed to allow the user's input on data layers and parameters depending on the AHP for their particular region. This automated system will focus on multicriteria evaluation for solar farm siting using the case study of New Mexico, United States.

Data and parameters

Data layers from a previous project using multicriteria evaluation to define solar farm site suitability in New Mexico, United States will be recycled for the purpose of this project. The eight data layers include shapefiles for the road and transmission networks, city centroids, population count, land cover and federal lands, as well as a raster file solar resource potential. These data each went through a series of automated preprocessing techniques with tools extracted from QGIS3 (see Figure 1).

A diagram was created to keep the group organized throughout the coding process. A map of how the variables will be preprocessed by the automated tool can be observed in Figure 1. The automated system will first ask the user to import the correct variables and input the desired parameters. Once the preprocessing begins, each variable will go through a series of tools to eventually be reclassified and aggregated into a single raster file that can be further analyzed in an open source software.

Figure 1: This flow chart emulates the tools used to preprocess the variables to reach a final weighted overlay map product.

Figure 1

For discrete variables, the road network and city centroid shapefiles were downloaded from the U.S. Census Bureau and transmission networks from the Homeland Infrastructure Foundation Level-Data (HIFLD) for New Mexico, United States. These shapefiles underwent rasterization and had their Euclidean distances calculated using the Raster Distance tool in QGIS3. In addition, a shapefile containing the border of New Mexico was included to clip the data files to area of study.

For categorical variables, population density was downloaded from the U.S. Census Bureau database, and land cover and restricted lands were downloaded from the RGIS database provided by the Earth Data Analysis Center at the University of New Mexico. Vegetation height attribute had to manually entered as a field in the land cover file. This was determined by taking the highest average recorded through Google searches. Two of these variables underwent manual action: population density and land cover. Population density had to be calculated by dividing the population by area, and then deleted all other fields besides the density calculation. Land cover underwent similar steps, first, it had to be vectorized and then all other fields were deleted besides the vegetation height.

Finally, a continuous raster image emulating solar resource potential was downloaded from the National Renewable Energy Laboratory (NREL). Images for the solar resource came in 12 separate raster files as averages for each month of the year. This source was manually edited by adding all the images together and then diving by 12 to receive a yearly average for solar resource potential in one raster file.

The parameters that will be used in this study were extracted from a publication by Jason R. Janke* (2010) that used Analytical Hierarchy Process (AHP) for site suitability of solar farms in an adjacent state (see Table 1).

Table 1: This table describes the parameters to be used on the test data. Parameters copied from article by J. R. Janke.

Table 1

Methodology

A tutorial was used that explained how to build a plugin in QGIS using Python. The tutorial generated a generic script that connected the interface designed in Qt5 to QGIS3's plugin feature. There were many things to install to be able to develop the plugin in Python, which can be seen as follows:

sudo apt-get update
pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

The Plugin Builder in QGIS3 requires a form to be filled with details related to the plugin being built. Once generated, QGIS3 creates a folder with the resources required to begin building the tool in Python. This folder had to be moved to appear in the QGIS plugins folder in File Explorer. Once moved to the correct location, the experimental plugin will appear in the installed plugins inside the QGIS program.

Once the plugin was enabled, the dialog box was designed inside Qt5 using a .ui file generated in the folder by QGIS3. Different boxes were integrated into the dialog box to interact with the user and their parameter preferences. For the sake of this study, the variable inputs were mimicked from a popular study conducted by Jason R. Janke (2010). By saving the edits, the updated dialog box appeared in QGIS3 when activating the experimental plugin.

Next came the logic behind the plugin. A file was automatically created inside the folder by QGIS3. The python file was loaded into a text editor where the python codes for the tools could be added and connected to one another according to which variable was added in each of the combo boxes in the dialog box, as well the preferred parameters from the user.

The code for the tools were copied from QGIS3 by running the tool on a file and going to the processing history. The history lists the python script in the details which is what was used to integrate into the main module. An example of the Rasterize tool that was translated into a function can be seen below:

def Rasterize(infile,Boundary):
    tf = tempfile.TemporaryDirectory()
    tfile = tf.name + "\\Rasterisation.tif"
    area=Boundary.extent()
    raster=processing.run("gdal:rasterize",        
        {'INPUT':infile,\
        'FIELD':None,'BURN':1,'UNITS':1,\
        'WIDTH':2,'HEIGHT':2,\
        'EXTENT':area,\
        'NODATA':0,'OPTIONS':'','DATA_TYPE':5,'INIT':None,\
        'INVERT':False,\
        'OUTPUT': tfile})

The output files were saved to a temporary location in the computers for other tools to draw upon. Each of the tools were saved into separate .py files that the main module drew upon. The main module used a class called MCDM which called upon tool functions in other modules to preprocess each of the variables according to the combo box inputs. An example of the road network being processed can be seen below:

  # Road network  

    # Retrieving values from interface
            Road = self.dlg.mMapLayerComboBox_1.currentText()
            V_Road = QgsProject().instance().mapLayersByName(Road)[0]
            Road_O = str(self.dlg.comboBox.currentText())
            Road_W =int(self.dlg.spinBox.value())

    # Applying tools
            R_Road=Rasterize(V_Road,V_Boundary)
            R_Road_distance=RasterDistance(R_Road)
            R_Road_D_Clip=RasterClip(R_Road_distance,V_Boundary)
            R_Road_DC_resa=Resample(R_Road_D_Clip,PixelSize)
            RRoadDC_Reclass,Location=Reclassify(R_Road_DC_resa,Road_O)

    # Display
            self.iface.addRasterLayer(Location, "reclassify")

Once all of the components were integrated into the script and were functioning properly, the product was saved and then ran in plugin component of QGIS3 to produce a downloadable raster file that could then be handled thereon however as the user wishes.

Results

Using the variables collected for New Mexico, United States and the parameters taken from the study by Jason R. Janke (2010), a final output raster file was created (see Image 1).

Image 1: The output image produced by the MCDM plugin in QGIS3.

Image 1

Conclusion

By automating the variable preprocessing steps involved in multicriteria analysis, the amount of time it took to create a weighted overlay image to determine site suitability significantly decreased. The plugin is biased in that it only used one study by Jason R. Janke (2010) to determine allowable input variables for the plugin. It also requires some manual preprocessing for a few layers for the tool to work, when the purpose was to be able to input raw variables and let the plugin do the work.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published