Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering PostGIS

You're reading from   Mastering PostGIS Modern ways to create, analyze, and implement spatial data

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781784391645
Length 328 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Dominik Mikiewicz Dominik Mikiewicz
Author Profile Icon Dominik Mikiewicz
Dominik Mikiewicz
Michal Mackiewicz Michal Mackiewicz
Author Profile Icon Michal Mackiewicz
Michal Mackiewicz
Tomasz Nycz Tomasz Nycz
Author Profile Icon Tomasz Nycz
Tomasz Nycz
George Silva George Silva
Author Profile Icon George Silva
George Silva
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Importing Spatial Data FREE CHAPTER 2. Spatial Data Analysis 3. Data Processing - Vector Ops 4. Data Processing - Raster Ops 5. Exporting Spatial Data 6. ETL Using Node.js 7. PostGIS – Creating Simple WebGIS Applications 8. PostGIS Topology 9. pgRouting

Obtaining test data

Before we start importing, let's get some data examples in different formats, specifically these:

You may either download the data using the links provided or find it in this chapter's resources.
The location you extract the data to is not important really, as you can later address it using either relative or absolute file paths.

Setting up the database

All the examples in this chapter use a database named mastering_postgis. This database has been created off the postgis template.

The PgSQL on my dev machine listens on port 5434, which is not the default port for the Postgres database (default is 5432); so when using a default DB setup, you may have to adjust some of the examples a bit.

If you need to change the port your db listens on, you should locate the db data directory, where you will find a postgresql.conf file. This is a text file, so you can edit it with an ordinary text editor.
In order to adjust the port, find a port configuration in the Connections and Authentication section.

Schemas are a great way of managing the data and splitting it into meaningful collections. In most scenarios, one will have some production data, archive data, incoming data, and so on sensibly kept in separate schemas. Using additional schemas will depend on your requirements, but we do encourage you to introduce using schemas into your daily practice if you do not yet do so. The following examples import the data into tables defined in the data_import schema.

You have been reading a chapter from
Mastering PostGIS
Published in: May 2017
Publisher: Packt
ISBN-13: 9781784391645
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image