Build only farmhouses on farmlands, preferably on stilts. Build diversionary channels around urban areas. During floods, let the farmlands flood. Historically, that also increased the nutrients in the soil.