The steps you need to follow to complete this recipe are as follows:
- Analyze the structure of the Global_24h.csv file (in Windows, open the CSV file with an editor such as Notepad):
$ cd ~/postgis_cookbook/data/chp01/ $ head -n 5 Global_24h.csv
The output of the preceding command is as follows:
- Create a GDAL virtual data source composed of just one layer derived from the Global_24h.csv file. To do so, create a text file named global_24h.vrt in the same directory where the CSV file is and edit it as follows:
<OGRVRTDataSource> <OGRVRTLayer name="Global_24h"> <SrcDataSource>Global_24h.csv</SrcDataSource> <GeometryType>wkbPoint</GeometryType> ...