From fcc3f377cb9254ab6b79543ace6a9f137e6a0e9b Mon Sep 17 00:00:00 2001 From: Mel Kiyama Date: Fri, 24 Apr 2020 16:34:00 -0700 Subject: [PATCH] docs - updates for PostGIS 2.5.4 (#9989) * docs - updates for PostGIS 2.5.4 -Updated version 2.1.5 -> 2.5.4 -Updated references to PostGIS topics -Removed geometry and geography limitation -Added enhancement for postgis_manager.sh script - support installing PostGIS in a non-default schema -Added examples of updating postgis.enable_outdb_rasters and postgis.gdal_enabled_drivers for a GPDB session -Remove ANALYZE limitation for user-defined data types -Added _postgis_index_extent function is not supported -Added note: <-> operator returns centroid/centroid distance -changed name of PostGIS aggregate function ST_MemCollect to ST_Collect * docs - fix typo * docs - minor changes to topic hierarchy. * docs - one more minor hierarchy change. * docs - update external URLs * docs - fix typo, minor cleanup * docs - found strange character --- gpdb-doc/dita/analytics/postGIS.xml | 196 ++++++++++++++++------------ 1 file changed, 112 insertions(+), 84 deletions(-) diff --git a/gpdb-doc/dita/analytics/postGIS.xml b/gpdb-doc/dita/analytics/postGIS.xml index 8e0111cdf3..5b176755fc 100644 --- a/gpdb-doc/dita/analytics/postGIS.xml +++ b/gpdb-doc/dita/analytics/postGIS.xml @@ -38,61 +38,57 @@ SQL functions (such as ST_Intersects) operating seamlessly on vector and raster geospatial data. PostGIS Raster uses the GDAL (Geospatial Data Abstraction Library) translator library for raster geospatial data formats that presents a single + href="https://gdal.org/user/raster_data_model.html" format="html" scope="external">single raster abstract data model to a calling application.

For information about Greenplum Database PostGIS extension support, see .

-

For information about PostGIS, see http://postgis.refractions.net/ +

For information about PostGIS, see https://postgis.net/

-

For information about GDAL, see http://www.gdal.org.

+

For information about GDAL, see https://gdal.org/.

- - Greenplum PostGIS Extension + + + Greenplum PostGIS Extension + +

The Greenplum Database PostGIS extension package is available from + VMware Tanzu Network. You can install the package using the + Greenplum Package Manager (gppkg). For details, see gppkg + in the Greenplum Database Utility Guide.

+

Greenplum Database supports the PostGIS extension with these component versions.

+

For the information about supported extension packages and software + versions, see the Greenplum Database Release Notes.

+

There have been significant changes in PostGIS 2.5.4 compared with the previously supported + version of 2.1.5. For a list of new and enhanced functions in PostGIS 2.5, see the PostGIS + documentation PostGIS Functions new or enhanced in 2.5.

+

For a comprehensive list of PostGIS changes in PostGIS 2.5.4 and earlier, see PostGIS 2.5 + Appendix A Release 2.5.4.

+ + + Greenplum Database PostGIS Limitations -

The Greenplum Database PostGIS extension package is available - from Pivotal - Network. You can install the package using the Greenplum Package Manager - (gppkg). For details, see gppkg in the Greenplum - Database Utility Guide.

-

Greenplum Database supports the PostGIS extension with these component versions.

    -
  • PostGIS 2.1.5
  • -
  • Proj 4.8.0
  • -
  • Geos 3.4.2
  • -
  • GDAL 1.11.1
  • -
  • Json 0.12
  • -
  • Expat 2.1.0
  • -

-

For the information about supported extension packages and software - versions see the Greenplum Database Release Notes.

-

Major enhancements and changes in PostGIS 2.1.5 from 2.0.3 include new PostGIS Raster - functions. For a list of new and enhanced functions in PostGIS 2.1, see the PostGIS - documentation PostGIS Functions new or enhanced in 2.1.

-

For a list of breaking changes in PostGIS 2.1, see PostGIS functions breaking changes in 2.1.

-

For a comprehensive list of PostGIS changes in PostGIS 2.1.5 and earlier, see PostGIS 2.1 - Appendix A Release 2.1.5.

+

The Greenplum Database PostGIS extension does not support the following features:

+
    +
  • Topology
  • +
  • A small number of user defined functions and aggregates
  • +
  • PostGIS long transaction support
  • +
+

For information about Greenplum Database PostGIS support, see .

- - Greenplum Database PostGIS Limitations - -

The Greenplum Database PostGIS extension does not support the following features:

-
    -
  • Topology
  • -
  • A small number of user defined functions and aggregates
  • -
  • PostGIS long transaction support
  • -
  • Geometry and geography type modifier
  • -
-

For information about Greenplum Database PostGIS support, see .

- -
@@ -101,7 +97,7 @@

The Greenplum Database PostGIS extension contains the postgis_manager.sh script that installs or removes both the PostGIS and PostGIS Raster features in a database. After the PostGIS extension package is installed, the script is in - $GPHOME/share/postgresql/contrib/postgis-2.1/. The + $GPHOME/share/postgresql/contrib/postgis-2.5/. The postgis_manager.sh script runs SQL scripts that install or remove PostGIS and PostGIS Raster from a database.

For information about the PostGIS and PostGIS Raster SQL scripts, and required PostGIS @@ -110,16 +106,19 @@ Enabling PostGIS Support -

Run the postgis_manager.sh script specifying the database and with the - install option to install PostGIS and PostGIS Raster. This example - installs PostGIS and PostGIS Raster objects in the database - mydatabase.postgis_manager.sh mydatabase install

+

Run the postgis_manager.sh script specifying the database, an optional + schema, and the install option to install PostGIS and PostGIS Raster. If + you do not specify a schema, the script installs PostGIS in the default + schema.postgis_manager.sh <dbname> [<schema_name>] install


+

This example installs PostGIS and PostGIS Raster objects in the database + mydatabase in the default + schema.postgis_manager.sh mydatabase install

The script runs all the PostGIS SQL scripts that enable PostGIS in a database: install/postgis.sql, install/rtpostgis.sql install/spatial_ref_sys.sql, install/postgis_comments.sql, and install/raster_comments.sql.

-

The postGIS package installation adds these lines to the +

The postGIS package installation adds these lines to the greenplum_path.sh file for PostGIS Raster support.

export GDAL_DATA=$GPHOME/share/gdal export POSTGIS_ENABLE_OUTDB_RASTERS=0 @@ -134,15 +133,21 @@ export POSTGIS_GDAL_ENABLED_DRIVERS=DISABLE_ALL 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.

+

Alternatively, you can do it at the session level by setting + postgis.gdal_enabled_drivers. For a Greenplum Database session, this + example SET command enables three GDAL raster + drivers.SET postgis.gdal_enabled_drivers TO 'GTiff PNG JPEG';

+

This SET command sets the enabled drivers to the default for a session. + SET postgis.gdal_enabled_drivers = default;

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 +

The command lists the driver long format name. The GDAL Raster table at + https://gdal.org/drivers/raster/index.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.

@@ -156,13 +161,33 @@ export POSTGIS_GDAL_ENABLED_DRIVERS=DISABLE_ALL SELECT short_name, long_name FROM ST_GDALDrivers();
+ + Enabling Out-of-Database Rasters + +

After installing PostGIS, the default setting + POSTGIS_ENABLE_OUTDB_RASTERS=0 in the + greenplum_path.sh file disables support for to out-of-database rasters. + To enable this feature, you can set the value to true (a non-zero value) on all hosts and + restart the Greenplum Database system.

+

You can also enable or disable this feature for a Greenplum Database session. For + example, this SET command enables the feature for the current + session.

+ SET postgis.enable_outdb_rasters = true; + When the feature is enabled, the server configuration parameter + postgis.gdal_enabled_drivers determines the accessible raster + formats. + +
Removing PostGIS Support -

Run the postgis_manager.sh script specifying the database and with the - uninstall option to remove PostGIS and PostGIS Raster. This example - removes PostGIS and PostGIS Raster support from the database - mydatabase.postgis_manager.sh mydatabase uninstall

+

Run the postgis_manager.sh script specifying the database, a schema name + (if necessary), and with the uninstall option to remove PostGIS and + PostGIS Raster. You specify the schema if you specified a schema when you installed + PostGIS.postgis_manager.sh <dbname> [<schema_name>] uninstall

+

This example removes PostGIS and PostGIS Raster support from the database + mydatabase that was installed in the default + schema.postgis_manager.sh mydatabase uninstall

The script runs both the PostGIS SQL scripts that remove PostGIS and PostGIS Raster from a database: uninstall_rtpostgis.sql and uninstall_postgis.sql.

@@ -229,10 +254,11 @@ SELECT name,ST_AsText(geopoint) FROM geotest;
  • +
  • +
  • -
  • @@ -254,7 +280,7 @@ SELECT name,ST_AsText(geopoint) FROM geotest;
  • geography
  • For a list of PostGIS data types, operators, and functions, see the PostGIS reference documentation.

    @@ -271,11 +297,12 @@ SELECT name,ST_AsText(geopoint) FROM geotest;
  • summarystats
  • unionarg
  • -

    For information about PostGIS Raster data Management, queries, and applications http://postgis.net/docs/manual-2.1/using_raster_dataman.html

    +

    For information about PostGIS Raster data Management, queries, and applications, see + https://postgis.net/docs/manual-2.5/using_raster_dataman.html.

    For a list of PostGIS Raster data types, operators, and functions, see the PostGIS Raster reference documentation.

    @@ -294,13 +321,9 @@ SELECT name,ST_AsText(geopoint) FROM geotest; @@ -331,7 +359,7 @@ SELECT AddGeometryColumn('public', 'geometries', 'geom', 0, 'LINESTRING', 2);After installing the PostGIS extension package, you enable PostGIS support for each database that requires its use. To enable or remove PostGIS support in your database, you can run SQL scripts that are supplied with the PostGIS package in - $GPHOME/share/postgresql/contrib/postgis-2.1/.