Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Points
Linestrings
Polygons
Summary

Instruction

Well done! It's time to move on and discover the next subtype of geometry: linestrings. Linestring are paths between two or more points. The first point of a linestring is the start (initial) point, and the last point of the linestring is the end (final) point. Linestrings can be closed when the start and end point are the same. Linestrings are also called simple if they do not touch or cross themselves. The picture below shows the various kinds of valid linestrings:

Linestrings

Linestrings are perfect for representing rivers, tram tracks, subway routes and various kinds of roads or passageways.

Exercise

Let's see what kinds of linestrings we have in our database. First, select all the information from the table sf_selected_railways. Do not forget to check the map visualization.

This table contains some of the railways used by trams, trains and the subway system. Each railway has a unique identifier (id) and a geometrical representation (course).

Stuck? Here's a hint!

Use the SELECT * FROM ... expression.