returns 0 for points, 1 for lines, 2 for polygons, 3 for volume.
returns max dimension for a collection.