4. Geospatial Data Types : Two-dimensional Data Types : CircularString Data Type
 
Share this page                  
CircularString Data Type
A CircularString has at least three coordinates and always an uneven number of them. In a three coordinate CircularString the first coordinate is the start point, the second is the midpoint of the arc between the first and third coordinate. If there are more than three coordinates the CircularString uses the end point of the last arc as the start point of the next arc.
Examples:
Without specifying SRID:
CREATE TABLE arcs (name VARCHAR(30), arc CIRCULARSTRING);
With specifying SRID:
CREATE TABLE arcs (name VARCHAR(30), arc CIRCULARSTRING SRID 4326);
Show a circle (1), arc (2), and a straight line (3):
CREATE TABLE arcs (id INT, arc CIRCULARSTRING);
INSERT INTO arcs (id, arc) VALUES (1, GeomFromText('CIRCULARSTRING(0 0, 3 3, 0 0)'));
INSERT INTO arcs (id, arc) VALUES (2, GeomFromText('CIRCULARSTRING(0 0, 2 2, 4 0)'));
INSERT INTO arcs (id, arc) VALUES (3, GeomFromText('CIRCULARSTRING(0 0, 2 2, 4 4)'));