Instruction
Well done! You've come a long way. It's time to wrap things up.
In this part of the course, we learned how to compare geometries with one another. We learned about the following useful functions:
ST_Equals(geomA,geomB)checks if two geometries have the same coordinates.ST_Overlaps(geomA,geomB)checks if two objects have some (but not all) space in common.ST_Touches(geomA,geomB)checks if two objects touch at a common border (but don't overlap).ST_Within(geomA,geomB)checks ifgeomAis entirely contained withingeomB.ST_Contains(geomA, geomB)- checks ifgeomBis entirely contained withingeomA.ST_Intersects(geomA,geomB)- checks whether two objects have any space or borders in common.ST_Distance(geomA,geomB)returns the shortest distance between two geometries.ST_DWithin(geomA,geomB,distanceX)checks whethergeomAandgeomBare within distance X of each other.- Spatial joins use spatial functions in the
ONclause. Most of the time, these areST_IntersectsorST_Contains. - You can also add further elements to spatial joins, such as aggregate functions with
GROUP BYclauses. - You can also use a spatial function like
ST_Lengthinside an aggregate function.
Alright, it's now time to practice all you've learned!
Exercise
Click to start the quiz.



