Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Functions returning geometries
Collections
Summary
15. Summary

Instruction

Awesome! We learned quite a lot of valuable information in this section, so it's time to wrap things up!

  • ST_Centroid(geom) and ST_PointOnSurface(geom) return points that represent the center of a geometry. The latter function guarantees that the point will lie on the inside the geometry but is slower.
  • ST_Buffer(geom, distance) returns a bounding region called a "buffer" for a given geometry whose boundaries are 'distance' away from the geometry's boundaries.
  • ST_Intersection(geom1, geom2) returns the shared part of two geometries.
  • ST_Union(geom1, geom2, ...) returns the sum of geometries. ST_Union(geo_column) is an aggregate variant that works like SUM(...).
  • Collections are sets of geometries stored together. These geometries need not all be of the same subtype.
  • ST_GeometryN(geometry, n) returns the nth geometry of the given collection.
  • ST_NumGeometries(geometry) returns the number of elements in the given collection.
  • ST_Area and ST_Length can also be used with collections.

Alright, how about a short quiz now?

Exercise

Click Next exercise to continue.