Geometric and file functions