How to modify a site in QGIS (I): Unify areas

Do you want to unify available areas (AA) of a site already defined? This article will show you how to do so with the QGIS tool.


In pvDesign, the structures belonging to separate areas cannot share a power station. To solve this, we usually recommend having less areas. To make the process of connecting these areas simple, you can use a tool called QGIS. This tutorial aims to explain how to connect different areas together using QGIS. 

Step 1: Install the KML tools plugin 

To start working with QGIS, you must perform a first mandatory step in order to import any KML format file that you want to modify.

Inside QGIS, on the top bar, click on Plugins -> Manage and Install Plugins, look for a plugin called 'KML tools' and install it.

Once the KML Tools plugin is installed, you can import any KML previously generated in Google Earth.

Step 2: Areas unification

Before opening QGIS, you can create a folder in Google Earth, and copy inside it the AAs that you want to unify. Then, you can save this new folder, in KMZ format, and open QGIS to continue with the process: 

  1. Click on Vector -> KML Tools -> Import KML/KMZ (top bar). This way, you can import the KML file to QGIS. 
  2. Create a polygon (a new layer) between the areas you want to unify. 
    Click on the 'New Shapefile Layer' icon, a window for the polygon generation will appear. Save the polygon in a directory, through 'File name', and choose 'Polygon' as the geometry type. 

  3. Draw the polygon that will unify the areas by activating the pencil and polygon buttons at the same time.

  4. Unify the areas by using the created polygon by clicking on Vector -> Geoprocessing Tools -> Union. 
    In the dialog box that pops up, the Input layer will be the last layer created (polygon, 'pol' in this example) and the Overlay layer will be the polygon layer that represents the areas to be unified ('Output polygon layer').

  5. A new layer called 'Union' is created, which must be dissolved: Vector -> Geoprocessing Tools -> Dissolve. In Input Layer select the 'Union' layer. 

  6. This last layer will automatically be named Dissolve; it will be the final AA that contains the two AAs that you wanted to unify. Next, if you don't want pvDesign to install structures in that unifying polygon, you should also generate a Restricted Area (RA).

  7. To obtain the RA, you generate a layer that is the difference between this last created AA ('Dissolve' layer) and the two imported areas in the first step ('Output polygon layer'): Vector -> Geoprocessing Tools -> Difference. 

As a result, a new layer ('Difference') is obtained, which will be the RA to be placed overlapping the defined total AA.

8. Finally, we export both the final AA (Layer 'Dissolved') and the RA (Layer 'Difference'), separately, by clicking on Vector -> KML Tools -> Export KML.


Both KMLs are imported into Google Earth, the polygons are named AA and RA, and inserted back into the initial KML folder. The unified areas, separated by an RA, could now share the same Power Station.

For any other questions or more information regarding this topic, you can contact us at: