4. Geospatial Data Types : Four-dimensional Data Types : LinestringZM Data Type
 
Share this page                  
LinestringZM Data Type
LineStringZM has the same properties as LineString but with two additional ordinates. In the WKT of LineStringZM the first ordinate is X, the second is Y, the third is Z, and the fourth is M.
Examples:
Without specifying SRID:
CREATE TABLE roads (name VARCHAR(30), road LINESTRINGMZM);
With specifying SRID:
CREATE TABLE roads (name VARCHAR(30), road LINESTRINGMZM SRID 4326);
Use linestrings to represent a road with measurement markers in three dimensional space.
CREATE TABLE roads (id INTEGER PRIMARY KEY, road LINESTRINGZM NOT NULL);
INSERT INTO roads (id, road) VALUES (1, GEOMFROMTEXT('LINESTRINGZM(0 0 0 0, 10 0 2 20, 10 10 1 -40)'));