Imported Upstream version 1.5.2

parent 646a7e53
This diff is collapsed.
CREDITS: 2009/07/01
The core team of PostGIS is:
Mark Cave-Ayland <>
Paul Ramsey <>
Regina Obe <>
Kevin Neufeld <>
Olivier Courtin <>
Sandro Santilli <>
All versions include substantial contributions from the
core team.
PostGIS was originally developed by Refractions Research Inc, of Victora,
British Columbia, Canada (, as a project
in using PostgreSQL as a geospatial data-store. Refractions continues to
provide hosting and infrastructure support to the project.
The following is a partial list of contributors who have participated
in the project:
See the postgis manual and the ChangeLog for more contributors.
Version 1.2.1 of PostGIS includes patches from:
Eduin Carrillo <> for AsKML() and Transform()
short circuit.
Version 1.1.0 of PostGIS includes patches from:
Obe, Regina <> with -k switch for pgsql2shp.
Version 1.0.0 of PostGIS includes code from:
Mark Cave-Ayland <> with new positional
operators, join estimator and general testing and support.
Markus Schaber <> author of the jdbc2 interface
Version 0.9 of PostGIS includes patches from:
Klaus Foerster <> on AsSVG()
Olivier Courtin <> on AsSVG()
Bruno Wolff III on the distance_sphere algorithm
Version 0.8 of PostGIS includes patches from:
Carl Anderson on schemas
STRK on numerous bug fixes and enhancements
Ralph Mason on WKT parsing for LWGEOM
Mark Cave-Ayland with help on PgSQL 7.5 statistics
Version 0.7 of PostGIS includes patches from:
Steffen Macke on numerous loader/dumper bugs.
Bernhard Reiter on some documentation issues and a loader limit.
Mark Cave-Ayland on truly_inside().
STRK on shp2pgsql improvements
Version 0.5 of PostGIS includes contributions from:
Geographic Data BC (David Skea and Mark Sondheim) with funding and
direction on adding calculations on a spheroid to PostGIS.
Version 0.2 of PostGIS includes contributions from:
Norman Vine on CygWin compilation issues
Version 0.1 of PostGIS included constributions from:
Dave Blasby - Core server objects and indexing (original contributions)
Paul Ramsey - Extensions to the PostgreSQL JDBC driver, doco, web.
Jeff Lounsbury - Shape file loader/dumper.
This diff is collapsed.
# Configuration directives are in postgis_config.h
all: postgis loaderdumper utils
@echo "PostGIS was built successfully. Ready to install."
install: all postgis-install loaderdumper-install
uninstall: postgis-uninstall loaderdumper-uninstall docs-uninstall comments-uninstall
clean: liblwgeom-clean postgis-clean loaderdumper-clean docs-clean test-clean
rm -f postgis.sql postgis_upgrade.sql
distclean: clean
rm -Rf autom4te.cache
rm -f config.log config.cache config.status
rm -f postgis_config.h
@echo '------------------------------------------------------'
@echo 'This command is intended for maintainers to use; it'
@echo 'deletes files that may need special tools to rebuild.'
@echo '------------------------------------------------------'
$(MAKE) -C doc maintainer-clean
$(MAKE) -C postgis maintainer-clean
$(MAKE) -C java/jdbc maintainer-clean
$(MAKE) distclean
rm -f configure
test check: postgis
$(MAKE) -C liblwgeom/cunit check
$(MAKE) -C regress check
$(MAKE) -C regress clean
$(MAKE) -C liblwgeom
$(MAKE) -C liblwgeom clean
postgis: liblwgeom
$(MAKE) -C postgis
$(MAKE) -C postgis clean
$(MAKE) -C postgis install
$(MAKE) -C postgis uninstall
$(MAKE) -C loader
$(MAKE) -C loader clean
$(MAKE) -C loader install
$(MAKE) -C loader uninstall
$(MAKE) -C extras/template_gis
$(MAKE) -C extras/template_gis clean
$(MAKE) -C extras/template_gis install
$(MAKE) -C extras/template_gis uninstall
$(MAKE) -C doc
$(MAKE) -C doc clean
$(MAKE) -C doc comments
$(MAKE) -C doc comments-install
$(MAKE) -C doc comments-uninstall
$(MAKE) -C doc install
$(MAKE) -C doc uninstall
$(MAKE) -C utils
config.status: configure
svn2cl --authors=authors.svn -i -o ChangeLog.svn
.PHONY: utils liblwgeom ChangeLog.svn
# this file copied and adapted from PostgreSQL source
# to allow easy build on BSD systems
all install uninstall clean distclean maintainer-clean test check docs docs-install docs-uninstall utils:
@IFS=':' ; \
for dir in $$PATH; do \
for prog in gmake gnumake make; do \
if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
GMAKE=$$dir/$$prog; \
break 2; \
fi; \
done; \
done; \
if [ x"$${GMAKE+set}" = xset ]; then \
echo "Using GNU make found at $${GMAKE}"; \
$${GMAKE} $@ ; \
else \
echo "You must use GNU make to build PostGIS." ; \
false; \
This diff is collapsed.
PostGIS - Geographic Information Systems Extensions to PostgreSQL
~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VERSION: 1.5.2 (2010/09/27)
This distribution contains a module which implements GIS simple
features, ties the features to rtree indexing, and provides some
spatial functions for accessing and analyzing geographic data.
Directory structure:
./ Build scripts and install directions.
./liblwgeom LWGEOM access library.
./postgis PostGIS library source code.
./java/ejb EJB Java support
./java/jdbc Extensions to the PostgreSQL JDBC drivers to support
the GIS objects.
./java/pljava PostgreSQL PL/Java spatial object support
./doc PostGIS Documentation
./loader A program to convert ESRI Shape files into SQL text
suitable for uploading into a PostGIS/PostgreSQL database
and a program for converting PostGIS spatial tables into
Shape files.
./utils Utility scripts for PostGIS (upgrade, profiling, ...)
./extras Various pieces that didn't belong to mainstream
(package management specfiles, WFS_locks, sample wkb parser)
./regress Regression tests
PostGIS is compatible with PostgreSQL 8.3 and above.
You *must* have the full PostgreSQL - including server headers - installed
for this to work.
* PROJ4 SUPPORT (Required, Version 4.5.0 or better):
The Proj4 reprojection library is required if you want to use the
transform() function to reproject features within the database.
* SPATIAL PREDICATE / GEOS SUPPORT (Required, Version 3.1.1 or better):
The GEOS library provides support for exact topological tests
such as Touches(), Contains(), Disjoint() and spatial operations
such as Intersection(), Union() and Buffer().
* XML SUPPORT (Required):
The LibXML2 library is required to use the ST_GeomFromGML() and
ST_GeomFromKML() functionality.
To configure PostGIS, run:
The results of the configuration can be easily seen within the
postgis_config.h file.
If pg_config can't be found in your $PATH configure will complain
and refuse to proceed. You can specify it using the
--with-pgconfig=/path/to/pg_config flag.
If PROJ4 has been installed (but cannot be found), configure will
complain and refuse to proceed. You can specify an alternative
installation directory using the --with-projdir=DIR option.
If GEOS has been installed (but cannot be found), configure will
complain and refuse to proceed. You can specify an alternative
geos-config file using the --with-geosconfig=/path/to/geos-config
See ./configure --help for more options.
PostGIS uses the GNU make (aka gmake) for building.
To build PostGIS library and utilities, as postgres run:
You want to run regress tests before installation.
To do so, as postgres run:
make check
The above will create a test database with postgis extensions,
run tests and then drop the db.
Final lines of output contain a summary of test results:
run, succeeded, failed. If you have any failure please
file a bug report using the online bug tracker:
To install PostGIS library and utilities, as postgres run:
make install
Installation paths will typically be derived by ``pg_config'':
- Lib in `pg_config --pkglibdir`
- Binaries (loader/dumper) in `pg_config --bindir`
- Important support files in [prefix]/share/contrib
- Manual pages in [prefix]/man
- Documentation in in [prefix]/share/doc
Where [prefix] above is extracted by `pg_config --configure`.
You can change them using ./configure switches.
PostGIS support must be enabled for each database that requires
its usage. This is done by feeding the postgis.sql (the enabler script)
file to the target database.
The enabler script requires the PL/pgSQL procedural language in order
to operate correctly, you can use the 'createlang' program from the
PostgreSQL installation.
(The PostgreSQL Programmer's Guide has details if you want to do this
manually for some reason.)
So, as postgres run:
createlang plpgsql <yourdatabase>
psql -f postgis/postgis.sql -d <your_database>
Your database should now be spatially enabled.
Upgrading existing spatial databases can be tricky as it requires
replacement or introduction of new PostGIS object definitions.
Unfortunately not all definitions can be easily replaced in
a live database, so sometimes your best bet is a dump/reload
PostGIS provides a SOFT UPGRADE procedure for minor or bugfix
releases, and an HARD UPGRADE procedure for major releases.
Soft upgrade consists of sourcing the postgis_upgrade_*.sql
script in your spatial database:
* postgis_upgrade_13_to_15.sql, upgrade a 1.3.x database
to 1.5
* postgis_upgrade_15_to_15.sql, upgrade a 1.4.x database
to 1.5
* postgis_upgrade_16_minor.sql, upgrade a 1.5.x database
to the latest minor release
If a soft upgrade is not possible the script will abort and
no harm will be done. You can then move on to the
HARD UPGRADE process. Always try a soft upgrade first, they
are much simpler.
Hard upgrade is a PostgreSQL dump/restore procedure combined
with a filter to selectively update PostGIS functions and
objects to point to a new library version.
Hard upgrades are required when object definitions have changed,