Slide 23
Slide 23 text
GEOMETRIC Data Types
These data types are used to represent two dimensional objects
●
Objects can be point, box, line, polygon, circle, path
– POINT
●
To define a point (x,y)
– Example: (‘2,3’) or (‘(2,3)’)
– LINE
●
To define a line using 2 points
– Example: ((x1,y1),(x2,y2))
– PATH
●
Represented by lists of connected points
– Example: (‘(2,3,4,5)’) or (‘[2,3,4,5]’)
– CIRCLE
●
For a circle
– Example: (‘2,3,4’) -> in this example 4 is radius
– BOX
●
To define a rectangle for instance : ((x1,y1),(x2,y2))
Rapid POSTGRESQL learning. 23