PointZM Data Type
A PointZM represents a single location using four coordinates, X, Y, Z, and M. The Z coordinate is the third dimension--the height above or below sea level. The M coordinate associates a user-defined measure, such as time or money, with the point. A PointZM is a 0-dimensional GeometryCollection.
Internally this is stored in a structure:
long long x;
long long y;
long long z;
long long m;
DDL Example:
Create a table where one of the attributes is a PointZM:
CREATE TABLE ncc_tree (
id INTEGER PRIMARY KEY,
type INTEGER NOT NULL FOREIGN KEY,
location POINTZM(4955) NOT NULL
);
The PointZM type takes one parameter, a small integer, which determines how to interpret the X, Y, and Z values, which represent the coordinate system (or spatial reference system) that the PointZM attribute is using.
DML Examples:
Insert a row containing PointZM into the table:
INSERT INTO ncc_tree (id, type, location)
VALUES (611, 5, POINTZM(44.9997 -63.5244 20 123));
Retrieve Point data from the database:
* SELECT name, shape FROM popplace WHERE name = 'Ottawa' \g
Executing . . .
-------------------------------------------------------------
name shape
-------------------------------------------------------------
Ottawa (1509069,-172683.109375,20,123)
-------------------------------------------------------------
(1 row)
Last modified date: 11/09/2022