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)

Setting up Node.js


Before we move on to some specific examples, Node.js must be installed. If you happen to not have Node.js set up already, you can obtain installation instructions and all the necessary resources from https://nodejs.org/.

In order to verify the installation, simply type the following in the console:

node -v

At the time of writing, the LTS (long term support) version was 6.9.1.

Note

The source code of the examples presented in this chapter can be found in the appropriate chapter resources.

The Node.js examples presented in this chapter will be rather simplistic. The point of the chapter is not to create bullet-proof Node.js modules, but rather to present and discuss the ideas and code them in such a way that our code is self-explanatory and easy to read and understand.

Since we will be editing simple JS files that are just text files, you can use whatever editor you find suitable for the task. However, I suggest having a look at Visual Studio Code - it is a product from Microsoft...