Book Image

Mastering PostGIS

By : Dominik Mikiewicz, Michal Mackiewicz , Tomasz Nycz
Book Image

Mastering PostGIS

By: Dominik Mikiewicz, Michal Mackiewicz , Tomasz Nycz

Overview of this book

PostGIS is open source extension onf PostgreSQL object-relational database system that allows GIS objects to be stored and allows querying for information and location services. The aim of this book is to help you master the functionalities offered by PostGIS- from data creation, analysis and output, to ETL and live edits. The book begins with an overview of the key concepts related to spatial database systems and how it applies to Spatial RMDS. You will learn to load different formats into your Postgres instance, investigate the spatial nature of your raster data, and finally export it using built-in functionalities or 3th party tools for backup or representational purposes. Through the course of this book, you will be presented with many examples on how to interact with the database using JavaScript and Node.js. Sample web-based applications interacting with backend PostGIS will also be presented throughout the book, so you can get comfortable with the modern ways of consuming and modifying your spatial data.
Table of Contents (9 chapters)

Summary


Most of the examples we have seen in this chapter involve extracting remote web-based data sources rather than processing local files. This is because there are more and more datasets provided by authorities via web services. I also find mixing remote and local resources more interesting than simply changing the formats of files or reprojecting them. As well as working with web-based data sources, we also worked with files. We downloaded ZIP and gzip archives and extracted them. We also read JSON files line by line and even made Node.js use ogr2ogr to import some shapefiles. We could do more file processing in ogr2ogr, GDAL, or psql but that would seem a bit dull.

Obviously our ETL examples were not very complex, and we did not design and execute any sophisticated data processing workflows. The important thing is that we did some task automation and have shown that adding value to our data does not have to be difficult. I do hope that, thanks to this chapter, repeatable, tedious,...