Spatiotemporal patterns as indicators of approaching critical transitions