I loved living there but could n,t imagine staying for ever. The line was drawn in the sand.
what is the meaning of underlined sentence?
It's not a good example. This phrase usually means that there is line which one will not cross. Here, it seems to be the line between living in this place for a while, and becoming a permanent resident. The person has "drawn the line" at becoming a permanent resident.