An earthquake in the Tasman Sea has sparked an emergency warning as authorities assess the risk of related tsunamis.