For this recipe, we will use the Rivers + lake centerlines dataset of North America and Europe with a scale 1:10m. Download the rivers dataset from the following naturalearthdata.com website (or use the ZIP file included in the code bundle provided with this book):
Or find it on the following website:
http://www.naturalearthdata.com/downloads/10m-physical-vectors/
Extract the shapefile to your working directory chp03/working. Import the shapefile in PostGIS using shp2pgsql as follows:
$ shp2pgsql -I -W LATIN1 -s 4326 -g the_geom ne_10m_rivers_lake_centerlines.shp chp03.rivers > rivers.sql $ psql -U me -d postgis_cookbook -f rivers.sql