Granularity in relational formalisms with application to time and space representation