Automatic building of Tiles and the corresponding data structure