The ST_CoordDim method returns the number of coordinates stored within each point in the geometry.
All geometries have at least two coordinate dimensions. For geographic spatial reference systems,
these are the latitude and longitude of the point. For other spatial reference system, these coordinates
are the X and Y positions of the point.
Geometries can optionally have Z and M values associated with each of the points in the geometry. These
additional coordinate values are not considered when computing spatial relations or set operations, but they
can be used to record additional information.
For example, the measure value (M) can be used to record the pollution at various points within a geometry.
The Z value usually is used to indicate elevation, but that interpretation is not imposed by the database server.
The following values may be returned by the ST_CoordDim method:
The geometry contains only two coordinates (either latitude/longitude or X/Y).
The geometry contains one additional coordinate (either Z or M) for each point.
The geometry contains two additional coordinate (both Z and M) for each point.
Spatial operations that combine geometries using set operations do not preserve any Z or M values
associated with the points of the geometry.