Part 1. Learning PostGIS

Welcome to PostGIS in Action. PostGIS is a spatial database extender for the PostgreSQL database management system. This book will teach you the fundamentals of spatial databases in general, key concepts in geographic information systems (GIS), and more specifically how to configure, load, and query a PostGIS-enabled database. You’ll learn how to perform actions with single lines of SQL code that you thought were possible only with a desktop GIS system. By using spatial SQL, much of the heavy lifting that would require many manual steps in desktop GIS tools can be scripted and automated.

The book is divided into three sections and four appendixes. Part 1 covers the fundamentals of spatial databases, GIS, and working with spatial data. Although part 1 is focused on PostGIS, many of the concepts you’ll learn in part 1 are equally applicable to other spatial relational databases.

Chapter 1 covers the fundamentals of spatial databases and what you can do with a spatially enabled database that you can’t do with a standard relational database. It concludes with a fast-paced example of loading fast food restaurant longitude/latitude data and converting it to geometric points, loading roads data from ESRI shapefiles, and doing spatial summaries by joining these two sets of data.

Chapter 2 covers all the geometry types that PostGIS has to offer. You’ll learn how to create these using well-known text (WKT) representations and the concepts of validity and simplicity.

Chapter 3 covers different approaches for storing data in PostgreSQL/PostGIS. You’ll learn how to store multiple kinds of geometries in a single geometry column as well as how to control what kinds of geometries can be stored in a column using constraints and built-in PostGIS management functions. We’ll cover PostgreSQL table inheritance and how to use it to enhance flexibility and for partitioning data. We’ll end with a real-world example using data from Paris, France.

Chapter 4 is a survey of the most common PostGIS and OGC-compliant functions that take as input one geometry. You’ll learn about functions for building new geometries and functions for processing that can simplify and morph geometries. You’ll also learn the fundamental accessor and measurement functions.

Chapter 5 covers relationships functions. These are the most common functions used between geometries and are often used for SQL joins. We’ll cover intersections, different kinds of equalities, nearest-neighbor queries, and the industry-standard Dimensionally Extended 9 Intersection Model (DE9IM) that most spatial relationship functions are based on.

Chapter 6 is an introduction to spatial reference systems, and we’ll explain the concepts behind them and how to work with them.

Chapter 7 concludes part 1 of the book with exercises in loading various kinds of spatial and non-spatial data into PostGIS using open source tools such as the PostgreSQL/PostGIS packaged psql, pgsql2shp, shp2pgsql, and shp2pgsql-gui, as well as the open source tools OGR2OGR and osm2pgsql.

In part 2 of the book we’ll focus on solving common and interesting spatial problems with the functions you learned about in part 1 as well as optimizing for performance.

In part 3 we’ll conclude the book with an overview of various common open source tools used to enhance the power of PostGIS and PostgreSQL.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.20.156