In this recipe, you will use the popular
ogr2ogr GDAL command for importing and exporting vector data from PostGIS.
Firstly, you will import a shapefile in PostGIS using the most significant options of the
ogr2ogr command. Then, still using
ogr2ogr, you will export the results of a spatial query performed in PostGIS to a couple of GDAL-supported vector formats.
The steps you need to follow to complete this recipe are as follows:
TM_WORLD_BORDERS-0.3.ziparchive to your working directory. You can find this archive in the book's dataset.
TM_WORLD_BORDERS-0.3.shp) in PostGIS using the
ogr2ogrcommand. Using some of the