crunchy-postgres-gis

PostgreSQL (pronounced “post-gress-Q-L”) is an open source, ACID compliant, relational database management system (RDBMS) developed by a worldwide team of volunteers. The crunchy-postgres-gis container image is unmodified, open source PostgreSQL packaged and maintained by professionals. This image is identical to the crunchy-postgres image except it includes the open source geospatial extension PostGIS for PostgreSQL in addition to the language extension PL/R which allows for writing functions in the R statistical computing language.

For more information about configuration options for the crunchy-postgres-gis please reference the crunchy-postgres docuentation. The crunchy-postgres-gis image is built using the crunchy-postgres image and supports the same features, packages, running modes, and volumes.

Features

In addition to features provided by the crunchy-postgres container, the following features are supported by the crunchy-postgres-gis container:

  • PostGIS
  • PL/R

Running Modes

The crunchy-postgres-gis Docker image can be run in modes to enable functionality. The MODE environment variable must be set to run the image in the correct mode. Each mode uses environment variables to configure how the container will be run, more information about these environment variables and custom configurations for each mode can be found in the following pages:

Verifying PL/R

In order to verify the successful initialization of the PL/R extension, the following commands can be run:

create extension plr;
SELECT * FROM plr_environ();
SELECT load_r_typenames();
SELECT * FROM r_typenames();
SELECT plr_array_accum('{23,35}', 42);
CREATE OR REPLACE FUNCTION plr_array (text, text)
RETURNS text[]
AS '$libdir/plr','plr_array'
LANGUAGE 'c' WITH (isstrict);
select plr_array('hello','world');