Learn how to create a KML/KMZ file from XY coordinates in pvDesign.
Some site areas already have specific coordinates which cannot directly be uploaded to Google Earth. In order to convert these points to usable polygons we will be using QGIS. Please make sure you have the latest version installed in your laptop of QGIS or any other GIS software.
Firstly make sure that your XY coordinates for site conversion are in a .CSV or similar file and that the first row includes a header with the first column header as X and second column header Y.
Insert coordinates to GIS
Upload your .CSV to your GIS software. For QGIS this is done by selecting 'Layer' → 'Add layer' → 'Add delimited text layer'. Select your file with the triple dots next to 'File name', select CSV and point coordinates. Also make sure that the right columns are selected under 'Geometry Definition'.
You also need to set the correct EPSG, which is the coordinate reference system (CRS). With the correct CRS, the XY coordinates will correspond to the right position on the map. Alternatively, the XY coordinates will have the same relative distance to each other, but not on the correct place on a map. If you already have the correct EPSG please select it using the 'Select EPSG' button on the right of the 'Geometry CRS' bar. If you do not have a EPSG yet, please continue to the following section.
Make sure to check your data sample, if you accordingly have configured everything correctly click on 'Add' to insert the layer.
Selecting the correct EPSG (CSR)
When there's no UTM EPSG zone communicated with your coordinate points, it becomes necessary to find the correct one. There are several sources to use and find your EPSG, in this article we will use EPSG.io.
On this website, type in the country or area in which your coordinates are positioned. Try the first EPSG and fill in the first coordinate (X and Y) of your dataset. If the map redirects to the right position, you found the right EPSG CSR. If not, try the next EPSG code on the list.
Once you have the correct EPSG, use it to insert the XY coordinates as explained in the previous section.
Polygon creation in QGIS
You now should have the XY coordinates as a layer in QGIS. To double check if your layer is positioned properly, select 'Web' → 'Quick map services' → 'Search QMS'. Use a map layer of your choice or use a typical one like 'Google Satellite'. Double click the QMS to load into your layers.
The next step is to create a polygon from the single coordinates in QGIS. Firstly select 'Processing' → 'Toolbox'. A window appears on your screen on the right, type in the search bar: 'Points to path' and double click the function. Make sure the correct layer and EPSG are selected and click 'Run'.
With the new line layer you correspondingly select the function 'Vector' → 'Geometry Tools' → 'Lines to Polygons' and select 'Run'.
Export to Google Earth
In this final step, make sure you already have KML tools integrated to QGIS. If this is not the case, select 'Plugins' → 'Manage and Install plugins' type 'KML tools' into the search bar and click on 'Install plugin'.
Afterwards you have the plugin installed. Select the correct layer, select 'Vector' → 'KML tools' → 'Export KMZ' and at 'Advanced settings' define the file name by clicking on the triple dots and select 'Save to file' and click 'Run'
Open the KMZ file with Google Earth, Rename the polygon with the correct name, move the layer out of the secondary folder and remove that secondary folder as well. Furthermore add the AC & MV placemark and ST polygon.
And that concludes the conversion from XY coordinates to KML/KMZ. In this example we used an AA but any type of polygon can be used in this manner to be converted to a readable site area in pvDesign.
For any other questions or more information regarding this topic, you can contact us at: email@example.com