PostGIS can not only measure distances between geometries, but also the dimensions of line and polygon geometries.