Great, that was easy! Now, we will show you how to convert a geometry column to a geography column to increase the accuracy of the representation. In PostGIS, all you have to do is append
::geometry to the name of the column. Take a look at the following example:
WHERE id = 1;
The query above will first convert the
boundaries column into a geography column, and will then calculate the area of the polygon it refers to.
Note that we can use
ST_Area (and a bunch of other functions) with both geometry and geography columns. However, it seems we didn't have to specify the SRID of the boundaries column. It turns out that an SRID is only necessary for geometry columns, as it describes the 2D projection that should be used.
Geography columns don't require any projections. By default, they return results in meters or square meters.