How to convert a shapefile to kml for several cases: the conversion will be done through QGIS, so make sure you have the latest version installed in your laptop.
Conversion of a simple .SHP with one available area and ST inside:
First, you must upload your .shp file as a vector layer by clicking on “Layer” →
Add layer → Add vector layer, as shown in the image below:
In the dialog box, you must browse the .shp file and click on Add.
After uploading the file successfully, you must export it as KML as follows:
- Right click on the layer and choose Export → save features as.
- Set the output file to KML and choose a folder where to save the file.
Once saved, you can open it on Google Earth and you will see that now, you have two elements under your folder: the available area and the substation.
Then, all you have to do is to rename the areas to the right nomenclature ‘AA’ and ‘ST’ (Available Area/Substation). Finally, you must add the placemarks “AC” and “MV” and save the folder in order to upload it to pvDesign.
Conversion of a simple SHP with one available area and ST outside:
In the case of having the ST polygon outside of the available area, and if the ST is far away. You can do the same steps in the previous case, but this time for each polygon.
You must select the layer with the polygons (AA and ST) enable the edit pen, then click on the ‘Edit’ tab, and at the bottom of the list, you must choose the ‘delete part’ option. Now, you must remove one of the polygons, let’s say, the ST polygon.
Add save & unclick
Now that our ST polygon is ready, we can do the same steps to the available area polygon. You open the layer once again in QGIS (for this you will need to always keep the original shapefile in a seperate folder), select it, enable the edit pen, and click on the ‘edit’ tab. Then, you must choose the ‘delete part’ and, this time, select the AA polygon to remove it.
Now, you can export the layer as KML, and open it on Google Earth. This way, you have the ST and AA areas as polygons in two different folders.
All you have to do now, is to drag the elements under the same folder and add the AC and MV placemarks in order to upload it to pvDesign.
Conversion of a complex SHP with many scattered available areas:
In the case of having many areas (polygons) that are scattered in the shp file, you can follow the previous process by exporting area by area and later adding the placemarks.
Conversion of a complex SHP with many grouped available areas:
As we always recommend, it is better to define the kml file with 1 big "AA" polygon and then establish as many restricted areas as you wish using "RA" polygons. The difference between doing this or having various "AA" polygons resides in how the Power Stations will be deployed:
- When you have several "AA" polygons, if a certain PowerStation (PS) is too big (requires many structures to be connected to it) and cannot fit in a certain "AA" polygon, this PS is completely filtered out and thus leaves an empty space in your parcel.
- On the other hand, when you define 1 big "AA" polygon which englobes that whole parcel and then you restrict the areas which you do not need, a PowerStation will be able to have structures connected to it
Hence, if you have many clustered areas as a shp file we suggest to proceed with the following process to convert it to one big available area and export it directly to KML:
First, you will need to create a layer by clicking on the tab ‘layer’ → Create layer → Add new shapefile layer, in the dialog box you must choose the geometry type as polygon, give it a name, and click on Ok.
Next, click on the edit pen, and draw a polygon by the Add polygon Feature (that you can name RA), which will contain all the areas, as illustrated in the picture below:
Drag the new layer (RA) under your original area to be able to see it.
Next, you must click on the tab ‘Vector’ → Geoprocessing tools and choose the tool ‘Difference’. In the dialog box, set the input to the new layer (RA) and the overlay layer as your initial layer (with all the areas), then click on Run.
Next, you must create another layer, this time with a geometry type of Lines and give it a name. Then, edit the layer, draw the lines that go from each polygon to outside the full area and save, the lines are illustrated in the picture below:
Now, you must use the buffer tool found in the Vector tab → Geoprocessing tools, while selecting the Lines layer, choose a smaller distance in the dialog box (0.00001) and click on Run.
Then, you must use the Difference tool once again (found in Vector → Geoprocessing tools) to connect all the areas through the lines and have one big area. This time, the input layer will be the layer created through the Difference tool for the first time and the overlay is the buffered layer, then click on Run.
Once open on Google Earth, you must create a polygon that will be the ‘AA’, which will be inside the RA polygon we have created on Qgis. Finally, you can add the other placemarks and nomenclature. Your kml is now ready to be uploaded to pvDesign!
For any other questions or more information regarding this topic, you can contact us at: email@example.com