Introduction
Points
Linestrings
Polygons
Summary

Instruction

Perfect! Now that we know these two tables, let's see how they are represented. We'll use our favorite function ST_AsText(geometry) for that purpose.

Exercise

Select the WKT for the route whose id equals 1 from the sf_bicycle_routes table.

As you can see, each linestring starts with the word LINESTRING, followed by a pair of parentheses. Inside the parentheses, we define all points that are contained in the linestring. The X and Y coordinates of each point are separated by a space, and the points themselves are separated by commas.

Stuck? Here's a hint!

Use ST_AsText(course).

Console

Code editor

Result

TableConsole