QGIS Tips and Tricks: How to Open Spatial Data Format in CSV

In the previous post I discussed about how to download building data from Google and also Microsoft, which is covered building data around the world that was generated from high resolution satellite imagery using deep learning approach. Unlike other spatial open data providers that provide the data in a specific spatial data format like geojson, shapefile, geopackage, etc. The downloaded building data from Google is in CSV format. As we all know, CSV is a text data format that stores data with separated commas as shown in the figure 1.

CSV Data
Figure 1. CSV Data

 
The data in figure 1 actually is building data that consists of many polygons to represent buildings. Then how to open the csv data in a GIS software so we can see the buildings as in figure 2? Let's find it out in this QGIS tips and tricks post.

Building data in CSV format
Figure 2. Building data in CSV format

 To open spatial data format in a CSV file can be done using the following steps:

1. Open a CSV file and spot the column name that store geometry value. It will be easier to recognize the column by open it using a spreadsheet that separate each column in a cell as seen in the figure 3. As you can see in the figure, the column name for my CSV data that store geometry is geometry with polygon type and consists of coordinates that construct the polygon.

CSV data open in a spreadsheet
Figure 3. CSV data open in a spreadsheet

2. From QGIS dekstop open Data Source Manager. Select Vector and choose the csv file as in figure 4.

Data Source Manager
Figure 4. Data Source Manager

3. After selecting a CSV file, the Options menu will appear right away. Look for GEOM_POSSIBLE_NAMES and type the name of geometry column.

4. Finally click the Add button and you will see the spatial data render in you QGIS window.

That's the way how to open a spatial data format in CSV using QGIS. Hope this tips can be useful. For another interesting QGIS tips and tricks please visit QGIS Tips and Tricks series. Thank you!


Related Posts

Disqus Comments