4. Geospatial Data Types : Three-dimensional Data Types : TriangleZ and TriangleM Data Types
 
Share this page                  
TriangleZ and TriangleM Data Types
TriangleZ and TriangleM have the same properties as Triangle but with one additional ordinate.
Examples:
Without specifying SRID:
CREATE TABLE triangles1 (name VARCHAR(30), tri TRIANGLEZ);
CREATE TABLE triangles2 (name VARCHAR(30), tri TRIANGLEM);
With specifying SRID:
CREATE TABLE triangles1 (name VARCHAR(30), tri TRIANGLEZ SRID 4326);
CREATE TABLE triangles2 (name VARCHAR(30), tri TRIANGLEM SRID 4326);
Show a line followed by an arc:
CREATE TABLE triangles1 (id INT, tri TRIANGLEZ);
CREATE TABLE triangles2 (id INT, tri TRIANGLEM);
INSERT INTO triangles1 (id, tri) VALUES (1, GeomFromText('TRIANGLEZ((0 0 0, 5 5 1, 10 0 1, 0 0 0), (10 10 2, 10 20 2, 20 10 1, 10 10 2))'));
INSERT INTO triangles2 (id, tri) VALUES (1, GeomFromText('TRIANGLEM((0 0 1, 5 5 1, 10 0 1, 0 0 1), (10 10 2, 10 20 2, 20 10 2, 10 10 2))'));