The board of supervisors of any county in which any harbor improvements may be constructed under the provisions of this chapter, may purchase lands and rights of way necessary therefor and pay for the same out of the proceeds of bonds herein provided; and for the purpose of carrying out the provision of this chapter said boards of supervisors are hereby clothed with the power and authority, and it is made their duty, to exercise the right of eminent domain, in their discretion, in the acquisition of such lands and rights of way.