Stromatolites in rock layers