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

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 use ST_X(geometry) and ST_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 are ST_StartPoint, ST_EndPoint, ST_NPoints and ST_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 are ST_Perimeter and ST_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 Next exercise to continue.