Instruction
Great job! It's time to wrap things up. We've learned quite a lot in this part of the course.
- The most basic subtypes of geometries are points, linestrings and polygons.
- A point represents a single location, e.g.
POINT(120 39). The parentheses list the X and Y coordinates of the point, separated by a space. You can useST_X(geometry)andST_Y(geometry)to get the X and Y coordinates, respectively. The X and Y coordinates represent the longitude and latitude of the location, respectively. - A linestring represents a path and can consist of multiple comma-separated points, e.g.
LINESTRING(10 15, 32 54, -5 7). The linestring functions we learned areST_StartPoint,ST_EndPoint,ST_NPointsandST_Length. - A polygon represents a specific shape whose boundaries are constructed from linestrings, e.g.
POLYGON((23 14, 43 72, 12 15, 23 14)). The polygon functions we learned areST_PerimeterandST_Area. - To get meters and square meters as the units for a particular geometry in San Francisco, use
ST_Transform(geometry,26910), where 26910 is the SRID.
Are you ready for a short quiz?
Exercise
Click to continue.



