16 Extending PostGIS with pgRouting and procedural languages

 

This chapter covers

  • PgRouting
  • PL/R
  • PL/Python
  • PL/V8

In this chapter we’ll cover four PostgreSQL extensions commonly installed with PostGIS. Extensions expand what you can do with PostGIS beyond the base installation. Each extension can come packaged with additional functions and data types (PostGIS is itself an extension), and each extension has a specific mission. It may allow you to script in an additional language, add specific functionality, or replace existing functions with faster implementations.

In this chapter, we’ll discuss the following extensions:

16.1 Solving network routing problems with pgRouting

16.1.1 Installing pgRouting

16.2 Extending PostgreSQL with PLs

16.2.1 Basic installation of PLs

16.2.2 What you can do with PLs

16.3 PL/R

16.3.1 Getting started with PL/R

16.3.2 What you can do with PL/R

16.3.3 Using R packages in PL/R

16.3.4 Converting geometries into R spatial objects and plotting spatial objects

16.3.5 Outputting plots as binaries

16.4 PL/Python

16.4.1 Installing PL/Python

16.4.2 Writing a PL/Python function

16.4.3 Using Python packages

16.4.4 Geocoding example

16.5 PL/V8: JavaScript in the database