Skip to Content
PostGIS Cookbook - Second Edition
book

PostGIS Cookbook - Second Edition

by Stephen Vincent Mather, Pedro Wightman, Bborie Park, Thomas Kraft, Mayra Zurbarán, Paolo Corti
March 2018
Beginner to intermediate content levelBeginner to intermediate
584 pages
14h 31m
English
Packt Publishing
Content preview from PostGIS Cookbook - Second Edition

Getting ready

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):

http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_rivers_lake_centerlines.zip

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PostgreSQL 13 Cookbook

PostgreSQL 13 Cookbook

Vallarapu Naga Avinash Kumar
PostgreSQL High Performance Cookbook

PostgreSQL High Performance Cookbook

Dinesh Kumar, Chitij Chauhan
Mastering PostGIS

Mastering PostGIS

Dominik Mikiewicz, Michal Mackiewicz, Tomasz Nycz

Publisher Resources

ISBN: 9781788299329Supplemental Content