cugwind / geospatial

PostGIS 2.1.5 for GreenPlum 5.x+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

geospatial repo

licence

This project is developing under GPL v2, because PostGIS is GPL v2.

sub-directories under planing

  1. postgis
  • geometry
  • raster
  1. trajectory
  2. utilities

how to compile it

To compile geospatial form source code, please install the follow third-party libraries first by following README.libs. For normal use without raster, please install json-c, geos and proj.4 To enbale raster function, plese install gdal and expat. The minimum version requirments are listed in Makefile.version.

Before setup the geospatial, please make sure the GPDB is installed correctly. To configure the geospatial, please use following command:

./configure --with-pgconfig="Your gpdb location"/bin/pg_config --with-raster
--without-topology --prefix=$GPHOME

If configuration is successfully, then please run make to compile the geospatial and run make install to install the geospatial to the GPDB. If you build from the extended PostGIS-2.x directory, you may compile with following command:

make USE_PGXS=1 clean all install

Here USE_PGXS will specify the correct install path to gpdb.

how to distribute it

The geospatial has bulit-in function to build the geospatial as a gppkg to allow user to install the geospatial directly into GPDB without compiling.

To build the gppkg, please make sure the source code of GPDB is downloaded and make sync_tools is run correctly.

After this, go to package folder and run ./build.sh or following command to build the gppkg automaticly.

make BLD_TARGETS="gppkg" \
	BLD_ARCH="rhel5_x86_64" \
	BLD_TOP="Your_gpdb_source_location/gpAux" \
	INSTLOC="Your_gpdb_installation_location/" \
	gppkg

how to use it

After you installed geospatial extention, run following commands to enable it:

psql -d mydatabase -f ${GPHOME}/share/postgresql/contrib/postgis-2.1/postgis.sql
psql -d mydatabase -f ${GPHOME}/share/postgresql/contrib/postgis-2.1/postgis_comments.sql
psql -d mydatabase -f ${GPHOME}/share/postgresql/contrib/postgis-2.1/spatial_ref_sys.sql
psql -d mydatabase -f ${GPHOME}/share/postgresql/contrib/postgis-2.1/rtpostgis.sql
psql -d mydatabase -f ${GPHOME}/share/postgresql/contrib/postgis-2.1/raster_comments.sql

Besides, to configure raster utilities, please set following variables into env of both master and segments, and restart the databases.

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

In near future we plan to move them in GUCs after we backport necessary features onto gpdb repo.

last update date

Kuien Liu, Haozhou Wawng, 26 May 2016

About

PostGIS 2.1.5 for GreenPlum 5.x+


Languages

Language:PLpgSQL 43.7%Language:C 39.8%Language:Shell 6.1%Language:Java 2.7%Language:XSLT 2.1%Language:Perl 1.8%Language:M4 1.2%Language:Makefile 0.9%Language:SQLPL 0.8%Language:Python 0.6%Language:Yacc 0.2%Language:Roff 0.1%Language:C++ 0.1%Language:CSS 0.0%Language:Lex 0.0%Language:Batchfile 0.0%Language:HTML 0.0%Language:Perl 6 0.0%