[postgis] Re: [HACKERS] Initial Release of PostGIS

Dave Blasby dblasby at refractions.net
Fri Jun 1 13:30:57 PDT 2001


> 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
bounding box.
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
bounding box 
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
of B's 
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
unimportant) 
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
geometry 
summary(GEOMETRY) - (info) give a text summary of whats inside the
geometry 



> 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,
./configure). 
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.

dave

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 





More information about the postgis-users mailing list