Rainbow Deals - hours only!Up to 80% off on all courses and bundles.-Close
5. Simple types of spatial data


As you've already seen, the coordinates column from the sf_sights table contains a long series of characters that are hardly understandable to humans. As you may remember from Part 2 this is an internal format understood by PostGIS. Luckily, we can make it understandable with the ST_AsText function, which allows us to change the format to Well-Known Text:

FROM sf_sights;

The result is quite different than before. Now, in each cell of the coordinates column we have one of three words: point, linestring, or polygon, followed by the list of coordinates in parentheses. Each word signifies a different subtype or simple type of the geometry in question. In this part of the course we will focus on explaining the purpose and usage of each of these subtypes.


Observe that the sf_sights table has different kinds of geometry objects. For example, Coit Tower is a point, Golden Gate Bridge is a polygon, and Lombard Street is a linestring.

Click the Next exercise button to continue.