Introduction
Points
Linestrings
Polygons
Summary

Instruction

Awesome! Now comes arguably the most interesting function intended for linestrings: ST_Length. As you may expect, it returns the length of the given linestring:

SELECT 
  ST_Length(course) 
FROM sf_selected_railways
WHERE id = 1;

Now, you may be wondering: what is the unit of length that ST_Length uses? Well, the answer is not that simple. Let's check this out.

Exercise

Run the template query and observe the answer.

Console

Code editor

Result

TableConsole