The circumstellar matter distribution of massive young stellar objects