October 2001
Beginner to intermediate
400 pages
7h 45m
English
Somewhat unique among popular RDBMSs, PostgreSQL provides an extensive set of geometric-oriented functions. These functions and their associated operators are useful when performing calculations on spatial-related data sets.
The AREA function computes the area occupied by a given object.
AREA(obj)
AREA(box '((1,1),(3,3))') → 4
There are several versions of the BOX function. Most perform conversions from other geometric types to the box data type. However, if the BOX function is passed two overlapping boxes, the result will be a box that represents where the intersection occurs.
BOX(box,box)—Perform an intersection.
BOX(circle)— Convert a circle to a box.
BOX(point,point) ...
Read now
Unlock full access