A powerful earthquake struck western Indonesia today, collapsing buildings and causing landslides in coastal cities and towns.