Where does the phrase "meet mountains and gather water" come from?

See 146, Prediction and Disclosure of Six Ren Xue in Real Estate Geomantic Survey.

According to the overall situation of the house, look at the gods in each house, determine the quality around the house, look at the geomantic terrain, and determine it with the movement of the house as the support. Take Shen You as the river, Haizi as the pond or depression, Yinmao as the forest, Siwu as the road, Chen Xu as the hills and mountains, and ugliness as the flat or wild. Looking at feng shui, heaven and earth are broken. Those who go down into the water will stop when they encounter soil; If there is wind, stop when you meet a mountain; If there is a fire, it will be solved when it meets water; Those who come down to earth will be imprisoned when they meet wood. Its feng shui changes between the upper and lower five elements. Looking at the ups and downs in the room, we can vividly see the lessons, bathe the immortality of God, break through the harm with punishment, and combine Oni Tsuka with morality. The method is as described above. There must be hidden dangers on the side where evil spirits ride. If restrained or revealed, it will not be harmed. If evil spirits are introduced without control, there will be disaster in this room.

In addition, there is a similar statement in Water Margin.

The fourth chapter of Water Margin:

On that day, Elder Zhizhen said, "Shen Zhi, you can't stay here. I have a younger brother, who met the abbot of Suoguo Temple in Tokyo, and was called the Zen Master of Educated Youth. I will take this book to find him to be a monk. I came to see it in the evening and gave you four words, which you can use all your life and remember today's words. " Shen Zhi knelt down and said, "Cudgel is willing to listen." The elder said, "When you meet the forest, you will be rich, when you meet the mountains, you will prosper, and when you meet the water, you will stop."