The steps you need to follow to complete this recipe are as shown:
- Inspect the structure of the CSV file, firenews.csv, which you can find within the book dataset (if you are on Windows, open the CSV file with an editor such as Notepad).
$ cd ~/postgis_cookbook/data/chp01/ $ head -n 5 firenews.csv
The output of the preceding command is as shown:
- Connect to PostgreSQL, create the chp01 SCHEMA, and create the following table:
$ psql -U me -d postgis_cookbook postgis_cookbook=> CREATE EXTENSION postgis; postgis_cookbook=> CREATE SCHEMA chp01; postgis_cookbook=> CREATE TABLE chp01.firenews ( x float8, y float8, place varchar(100), ...