LINESTRING is a collection of that are “strung together” into one geometric object. A LineString can be used to represent an arbitrary curve, such as a Bézier curve. In practice, this means that LineStrings are useful for representing real-world objects such as roads and rivers.
The coordinates of each Point that makes up the LineString are translated according to the current (denoted by an ) to determine what the Point “is”, or what it “means” relative to the (if any) in the data set.
You can also store a LINESTRING with the following additional dimensions:
- A third dimension coordinate
Z(LINESTRINGZ). - A measure coordinate
M(LINESTRINGM). - Both a third dimension and a measure coordinate (
LINESTRINGZM).
Z and M dimensions can be accessed or modified using a number of , including:
ST_ZST_MST_AffineST_ZmflagST_MakePointST_MakePointMST_Force3DST_Force3DZST_Force3DMST_Force4DST_SnapST_SnapToGridST_RotateZST_AddMeasure
- The Z/M dimension is not index accelerated when using spatial predicates.
- Some spatial functions ignore the Z/M dimension, with transformations discarding the Z/M value.
Examples
A LineString can be created from SQL by calling thest_geomfromtext function on a LineString definition expressed in the format as shown below.
st_makeline.

