| PostgreSQL Reference Manual - Volume 1 - SQL Language Reference by The PostgreSQL Global Development Group Paperback (6"x9"), 716 pages ISBN 0954612027 RRP £32.00 ($49.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
6.7 Geometric Types
Geometric data types represent two-dimensional spatial objects. Table 6-16 shows the geometric types available in PostgreSQL. The most fundamental type, the point, forms the basis for all of the other types.
Table 6-16: Geometric Types
| Name | Storage Size | Representation | Description
|
point | 16 bytes | Point on the plane | (x,y)
|
line | 32 bytes | Infinite line (not fully implemented) | ((x1,y1),(x2,y2))
|
lseg | 32 bytes | Finite line segment | ((x1,y1),(x2,y2))
|
box | 32 bytes | Rectangular box | ((x1,y1),(x2,y2))
|
path | 16+16n bytes | Closed path (similar to polygon) | ((x1,y1),...)
|
path | 16+16n bytes | Open path | [(x1,y1),...]
|
polygon | 40+16n bytes | Polygon (similar to closed path) | ((x1,y1),...)
|
circle | 24 bytes | Circle | <(x,y),r> (center and radius) |
A rich set of functions and operators is available to perform various geometric operations such as scaling, translation, rotation, and determining intersections. They are explained in section 7.10 Geometric Functions and Operators.
| ISBN 0954612027 | PostgreSQL Reference Manual - Volume 1 - SQL Language Reference | See the print edition |