NameDateSize

..16-Mar-201612 KiB

.gitattributes07-Aug-2015176

.gitignore20-Nov-20153.9 KiB

.gitlab-ci.yml30-Nov-2015535

.travis.yml09-Nov-2015676

astyle.sh03-Jul-2015764

autogen.sh18-May-20152 KiB

ChangeLog12-Oct-20152.3 MiB

ci/24-Aug-20154 KiB

configure.ac01-Dec-201548.1 KiB

CONTRIBUTING.md09-Nov-2015954

COPYING05-Jun-201317.7 KiB

CREDITS11-May-2013147

doc/15-Dec-20154 KiB

extensions/30-Nov-20154 KiB

extras/07-Aug-20144 KiB

GNUmakefile.in01-Dec-20153.2 KiB

HOWTO_RELEASE12-Oct-20153.3 KiB

liblwgeom/15-Dec-20154 KiB

libpgcommon/01-Dec-20154 KiB

LICENSE.TXT31-Oct-20132 KiB

loader/12-Oct-20154 KiB

macros/18-May-20154 KiB

make_dist.sh28-Sep-20151.9 KiB

Makefile07-Apr-2012771

MIGRATION07-Apr-20127.2 KiB

NEWS09-Dec-201577.7 KiB

postgis/15-Dec-20154 KiB

postgis_config.h.in17-Jun-20154.9 KiB

raster/18-May-20154 KiB

README.md30-Nov-20151.1 KiB

README.postgis16-Oct-20157.8 KiB

regress/15-Dec-201512 KiB

spatial_ref_sys.sql07-Aug-20154.3 MiB

STYLE07-Apr-20122.3 KiB

TODO18-May-20152.5 KiB

topology/30-Nov-20154 KiB

utils/12-Oct-20154 KiB

Version.config12-Oct-2015759

README.md

1Travis:
2 [![Build Status](https://secure.travis-ci.org/postgis/postgis.png)]
3 (http://travis-ci.org/postgis/postgis)
4Debbie:
5 [![Build Status](http://debbie.postgis.net:8080/buildStatus/icon?job=PostGIS_trunk)]
6 (http://debbie.postgis.net:8080/view/PostGIS/job/PostGIS_trunk/)
7Winnie:
8 [![Build Status](http://winnie.postgis.net:1500/buildStatus/icon?job=PostGIS_trunk)]
9 (http://winnie.postgis.net:1500/view/PostGIS/job/PostGIS_trunk/)
10GitLab-CI:
11 [![Gitlab-CI](https://gitlab.com/ci/projects/3944/status.png?ref=svn-trunk)]
12 (https://gitlab.com/ci/projects/3944?ref=svn-trunk)
13
14This file is here to play nicely with modern code repository facilities.
15Actual readme is [here](README.postgis).
16
17## Official code repository, issue tracker and wiki:
18https://trac.osgeo.org/postgis/
19
20## Official source tarball releases
21http://postgis.net/source
22
23If you would like to contribute to this project, please refer to our
24[contributing guidelines](CONTRIBUTING.md).
25
26## Project Home Page and Manuals
27Project homepage: http://postgis.net/
28PostGIS Manuals: http://postgis.net/documentation
29

README.postgis

1PostGIS - Geographic Information Systems Extensions to PostgreSQL
2=================================================================
3
4:Version: 2.3.0
5:Date: 2016-XX-XX
6:Website: http://postgis.net
7
8This distribution contains a module which implements GIS simple features, ties
9the features to R-tree indexing, and provides many spatial functions for
10accessing and analyzing geographic data.
11
12Directory structure::
13
14  ./            Build scripts and install directions
15  ./doc         PostGIS Documentation
16  ./extensions  Support for the PostgreSQL Extensions framework
17  ./extras      Various pieces that didn't belong to mainstream
18                (package management specfiles, WFS_locks, sample WKB parser)
19  ./liblwgeom   LWGEOM geometry library
20  ./libpgcommon PostGIS library to bridge LWGEOM to PostgreSQL
21  ./loader      A program to convert ESRI Shape files into SQL text suitable
22                for uploading into a PostGIS/PostgreSQL database and a program
23                for converting PostGIS spatial tables into shapefiles
24  ./postgis     PostGIS library source code
25  ./raster      PostGIS rasters extension source code
26  ./regress     Online regression tests
27  ./topology    PostGIS topology extension source code
28  ./utils       Utility scripts for PostGIS (upgrade, profiling, ...)
29
30
31REQUIREMENTS
32------------
33
34PostGIS is compatible with PostgreSQL 9.1 and above.
35
36You *must* have the full PostgreSQL - including server headers - installed for
37this to work.
38
39* PROJ4 (Required, Version 4.6.0 or higher):
40
41  The PROJ4 catographic projection library is required if you want to use the
42  ST_Transform() function to reproject features within the database.
43
44    http://trac.osgeo.org/proj/
45
46* GEOS (Required, Version 3.3.0 or higher 
47  - 3.4+ is strongly recommended and needed for full features):
48
49  The GEOS library provides support for exact topological tests such as
50  ST_Touches(), ST_Contains(), ST_Disjoint() and spatial operations such as
51  ST_Intersection(), ST_Union() and ST_Buffer(). GEOS 3.4+ is recommended.
52
53    http://trac.osgeo.org/geos/
54
55* XML SUPPORT (Required, Version 2.5.0 or higher):
56
57  The LibXML2 library is required to use the ST_GeomFromGML() and
58  ST_GeomFromKML() functionality.
59
60    http://xmlsoft.org/
61
62* GNU gettext
63
64   The loader, and hence PostGIS, requires GNU gettext 0.14 or higher
65   for translation support
66   (typically in libc on GNU/Linux, in which case 0.17 is required).
67
68* JSON-C (Optional, Version 0.9 or higher)
69
70  JSON-C is used to import GeoJSON via the function ST_GeomFromGeoJson().
71
72    http://github.com/json-c/json-c/wiki
73
74  You can get it installed in apt-based systems using::
75
76    apt-get install libjson0-dev
77
78* GDAL (Optional, Version 1.8.0 or higher 1.9+ is strongly recommended)
79
80  GDAL (http://gdal.org) is *required* if you want to compile PostGIS 
81  with raster or extension support. To compile without raster support you
82  must ``./configure --without-raster`` (also disables extension)
83  
84* CGAL 4.1+ and SFCGAL (Optional) needed for advanced 3D support
85
86  https://github.com/Oslandia/SFCGAL
87
88
89CONFIGURATION
90-------------
91
92To configure PostGIS, run::
93
94  ./configure
95
96If the file is missing you must be using a development version
97of the code. In that case call ./autogen.sh to generate it.
98
99The results of the configuration can be easily seen within the
100``postgis_config.h`` file.
101
102If ``pg_config`` can't be found in your ``$PATH`` configure will complain
103and refuse to proceed. You can specify it using the
104``--with-pgconfig=/path/to/pg_config`` flag.
105
106If PROJ4 has been installed but cannot be found, configure will complain and
107refuse to proceed. You can specify an alternative installation directory using
108the ``--with-projdir=DIR`` option.
109
110If GEOS has been installed but cannot be found, configure will complain and
111refuse to proceed. You can specify an alternative ``geos-config`` file using
112the ``--with-geosconfig=/path/to/geos-config`` option.
113
114If GDAL cannot be found, configure will complain and refuse to proceed.
115You can either proceed without raster support using ``--without-raster``
116or use ``--with-gdalconfig=/path/to/gdal-config`` option.
117
118By default, both Topology and Raster extensions are enabled in ``./configure``.
119
120If you want to compile PostGIS *without* Raster support,
121you must provide the ``--without-raster`` option.
122
123If you want to compile PostGIS *without* Topology support,
124you must provide the ``--without-topology`` option.
125
126PostGIS will be compiled with sfcgal support if it is found.
127You can explicitly state the location with --with-sfcgal=path/to/sfcgal
128
129See ``./configure --help`` for more options.
130
131
132BUILD
133-----
134
135PostGIS uses the GNU make (aka gmake) for building. To build PostGIS library
136and utilities, as postgres run::
137
138  make
139
140
141TESTING
142-------
143
144You want to run regress tests before installation. To do so, as postgres run::
145
146  make check
147
148The above will create a test database with PostGIS extensions, run tests and
149then drop the test database.
150
151Final lines of output contain a summary of test results: run, succeeded,
152failed. If you have any failure please file a bug report using the online bug
153tracker: http://trac.osgeo.org/postgis/report/3
154
155
156INSTALLATION
157------------
158
159To install PostGIS library and utilities, as root run::
160
161  make install
162
163Installation paths will typically be derived by ``pg_config``:
164
165 - Lib in ``pg_config --pkglibdir``
166 - Binaries (loader/dumper) in ``pg_config --bindir``
167 - Important support files in ``[prefix]/share/contrib``
168 - Manual pages in ``[prefix]/man``
169 - Documentation in in ``[prefix]/share/doc``
170
171Where `[prefix]` above is extracted from ``pg_config --configure``.
172
173You can change them using ``./configure`` switches. See CONFIGURATION section.
174
175
176CREATING NEW SPATIAL DATABASES
177------------------------------
178
179PostGIS support must be enabled for each database that requires its usage. 
180Enabling spatial functionality requires a PostgreSQL super-user.
181
182    CREATE EXTENSION postgis;
183  
184
185UPGRADING EXISTING SPATIAL DATABASES
186------------------------------------
187
188Upgrade PostGIS using the "ALTER EXTENSION" facility.
189
190  ALTER EXTENSION postgis UPDATE TO '2.2.0';
191  
192
193USAGE
194-----
195
196Try the following example SQL statements to create tables with
197geometry columns::
198
199  CREATE TABLE geom_test ( gid int4, geom geometry, name varchar(25) );
200  INSERT INTO geom_test ( gid, geom, name )
201    VALUES ( 1, 'POLYGON((0 0 0,0 5 0,5 5 0,5 0 0,0 0 0))', '3D Square');
202  INSERT INTO geom_test ( gid, geom, name )
203    VALUES ( 2, 'LINESTRING(1 1 1,5 5 5,7 7 5)', '3D Line' );
204  INSERT INTO geom_test ( gid, geom, name )
205    VALUES ( 3, 'MULTIPOINT(3 4,8 9)', '2D Aggregate Point' );
206  SELECT * from geom_test WHERE ST_Intersects(geom, ST_MakeEnvelope(2,2,3,3));
207
208The following SQL creates proper full entries in the ``SPATIAL_REF_SYS``
209and ``GEOMETRY_COLUMNS`` tables, and ensures that all geometries are created
210with an SRID::
211
212  CREATE TABLE geotest (
213    id INT4,
214    name VARCHAR(32),
215    geopoint GEOMETRY(POINT, 4326)
216    );
217
218  INSERT INTO geotest (id, name, geopoint)
219    VALUES (1, 'Olympia', ST_GeomFromText('POINT(-122.90 46.97)', 4326));
220  INSERT INTO geotest (id, name, geopoint)
221    VALUES (2, 'Renton', ST_GeomFromText('POINT(-122.22 47.50)', 4326));
222
223  SELECT name, AsText(geopoint) FROM geotest;
224
225
226Spatial Indexes
227~~~~~~~~~~~~~~~
228
229PostgreSQL provides support for GiST spatial indexing. The GiST scheme offers
230indexing even on large objects, using a system of "lossy" indexing where a
231large object is proxied by a smaller one in the index.  In the case of the
232PostGIS indexing system, all objects are proxied in the index by their
233bounding boxes.
234
235You can build a GiST index with::
236
237  CREATE INDEX <indexname>
238    ON <tablename>
239    USING GIST ( <geometryfield> );
240
241Always run the ``VACUUM ANALYZE <tablename>`` on your tables after creating an
242index. This gathers statistics which the query planner uses to optimize index
243usage.
244
245
246PostGIS Topology support
247~~~~~~~~~~~~~~~~~~~~~~~~
248
249See topology/README for more informations about topology support.
250