Refractions Research is pleased to announce the inital release of
PostGIS, a set of 3-D geographic object types for the PostgreSQL 7.1.x
PostGIS includes the following functionality:
- Simple Features as defined by the OpenGIS Consortium (OGC)
- Polygon (with holes)
- The text representation of the simple features is the OGC
Well-Known Text format.
- Geometries can be indexed using either R-Tree (not recommended) or
- Simple geospatial analysis functions.
- PostgreSQL JDBC extension objects corresponding to the geometries.
PostGIS is released under the GNU General Public Licence.
[postgis] Re: [HACKERS] Initial Release of PostGIS
> This looks cool, but it raises a question. Are there any operators or
> functions besides the logical "contained within" ones?
Here's a list of the functions provided in the package.
Most of the operators work on the bounding box of the geometries. If
you want more precision, you can use the truly_inside(A,B) function.
Where A=a geometry and B=a bounding box. Note, if you uses a geometry
for B, the function will automatically convert this geometry to a
What kind of operators were you interested in?
length3d(GEOMETRY) - 3d length of all linestrings in GEOMETRY
length2d(GEOMETRY) - 2d length of all linestringsin GEOMETRY
area2d (GEOMETRY) - area of all polygons (projected to the XY plane)
perimeter2d(GEOMETRY) - 2d length of all polygon rings
perimeter3d(GEOMETRY) - 3d length of all polygon rings
truly_inside(GEOMETRY,GEOMETRY) - true if part of A is inside B's
A <& B - true if A's bounding box overlaps or is to the right of B's
A << B - true if A's bounding box is strictly to the right of B's
A &> B - true if A's bounding box overlaps or is strictly to the right
A >> B - true if A's bounding box is strictly to the left of B's
A ~= B - true if A's geometry is the same as B's (order of sub-geometry
A ~ B - true if A's bounding box is contained by B's bounding box
A @ B - true if A's bounding box contains B's bounding box
A && B- true if A's bounding box overlaps B's bounding box
npoints(GEOMETRY) - (info) how many points are in the geometry
nrings(GEOMETRY) - (info) how many rings are there in the geometry
mem_size(GEOMETRY) - (info) how much space does this geometry take up
numb_sub_objs(GEOMETRY) - (info) how many sub objects are inside this
summary(GEOMETRY) - (info) give a text summary of whats inside the
> Also, must it be compiled within the contrib directory, or can it be
> compiled separately from the postgresql distribution with a set of
> installed postgresql header files?
Unfortunately, PostGIS requires a proper "postgres.h" for your system.
This is only created if you have a full source distribution.
Since version 7.1, the postgres installation does not include postgres.h
in the installed include files. Basically, to compile any of the
server-side extras, you now need a complete, configured source tree of
the distribution (not that this is too onerous: retreive the source,
You can untar the PostGIS distribution somewhere other than contrib, but
you'll have to edit the 'top_builddir' in the Makefile to point to your
postgresql source directory.