Typhoon Shanshan is hammering southwestern Japan, killing at least four people and leaving scores of others injured.