For the purpose of promoting health, safety, or the general welfare of the community the governing body of any municipality may regulate and restrict the height, number of stories, and size of buildings and other structures; the percentage of lot that may be occupied; the size of the yards, courts, and other open spaces; the density of population; and the location and use of buildings, structures, and land for trade, industry, residence, flood plain, or other purposes. A municipality may enter into an agreement with any landowner specifying the conditions under which the landowner's property may be developed.
SDCL 11-4-1