Yosef Karo, Shulchan Aruch — Yoreh Deah 362
“ One who puts his deceased in a coffin but does not bury him in the ground, transgresses [a negative commandment] of not letting a dead body sit overnight. And if he put the deceased in a coffin and buried him in the ground, he does not transgress the commandment. Nevertheless it is best to bury the deceased in the ground itself, even outside of the land of Israel. ”
