From 2155c5a8cf8bb7f13f49c6e248fd967a74fed591 Mon Sep 17 00:00:00 2001 From: Mel Kiyama Date: Tue, 5 Dec 2017 09:39:11 -0800 Subject: [PATCH] docs: postGIS - add GDAL raster driver information (#3961) * docs: postGIS - add GDAL raster driver information * docs: postgis GDAL - fix typos. --- .../dita/ref_guide/extensions/postGIS.xml | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/gpdb-doc/dita/ref_guide/extensions/postGIS.xml b/gpdb-doc/dita/ref_guide/extensions/postGIS.xml index df01d73571..ffd53db99e 100644 --- a/gpdb-doc/dita/ref_guide/extensions/postGIS.xml +++ b/gpdb-doc/dita/ref_guide/extensions/postGIS.xml @@ -123,7 +123,37 @@ greenplum_path.sh file for PostGIS Raster support.

export GDAL_DATA=$GPHOME/share/gdal export POSTGIS_ENABLE_OUTDB_RASTERS=0 -export POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL +export POSTGIS_GDAL_ENABLED_DRIVERS=DISABLE_ALL + + + + Enabling GDAL Raster Drivers + +

PostGIS uses GDAL raster drivers when processing raster data with commands such as + ST_AsJPEG(). As the default, PostGIS disables all raster drivers. You + enable raster drivers by setting the value of the + POSTGIS_GDAL_ENABLED_DRIVERS environment variable in the + greenplum_path.sh file on all Greenplum Database hosts.

+

To see the list of supported GDAL raster drivers for a Greenplum Database system, run the + raster2pgsql utility with the -G option on the + Greenplum Database master.

+

+ raster2pgsql -G +

+

The command lists the driver long format name. The GDAL Raster Formats table + at http://www.gdal.org/formats_list.html lists the long format names and the + corresponding codes that you specify as the value of the environment variable. For + example, the code for the long name Portable Network Graphics is PNG. + This example export line enables four GDAL raster drivers.

+ export POSTGIS_GDAL_ENABLED_DRIVERS="GTiff PNG JPEG GIF" +

The gpstop -r command restarts the Greenplum Database system to use the + updated settings in the greenplum_path.sh file.

+

After you have updated the greenplum_path.sh file on all hosts, and have + restarted the Greenplum Database system, you can display the enabled raster drivers with + the ST_GDALDrivers() function. This SELECT command lists + the enabled raster drivers.

+ SELECT short_name, long_name FROM ST_GDALDrivers();
@@ -359,7 +389,7 @@ psql -d mydatabase -f greenplum_path.sh file for PostGIS Raster support.

export GDAL_DATA=$GPHOME/share/gdal export POSTGIS_ENABLE_OUTDB_RASTERS=0 -export POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL +export POSTGIS_GDAL_ENABLED_DRIVERS=DISABLE_ALL

GDAL_DATA specifies the location of GDAL utilities and support files used by the GDAL library. For example, the directory contains EPSG support files such as gcs.csv​ and pcs.csv (so called dictionaries, mostly @@ -399,7 +429,7 @@ export POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL greenplum_path.sh file.

export GDAL_DATA=$GPHOME/share/gdal export POSTGIS_ENABLE_OUTDB_RASTERS=0 -export POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL +export POSTGIS_GDAL_ENABLED_DRIVERS=DISABLE_ALL
-- GitLab