Any railroad company owning or operating a railroad or any part thereof in this state, whether chartered under the laws of this state or under the laws of any other state or states, is empowered to fill its trestles and to make all creek changes necessary for the same; to construct channels and canals contiguous to its rights of way so as to prevent the unnecessary crossing of creeks and to make such other changes in the beds of creeks as may be necessary for the proper construction and maintenance of its roadbeds; provided, that where any property owner is damaged by such change in a creek, such landowners shall be entitled to just compensation for the same.