Each railroad authorized to construct, operate, or maintain a road within this state, may cross, intersect, join, and unite its road with any other railroad's previously constructed road, at any point on its route and upon the grounds of the other railroad, with the necessary turnouts, sidings, and switches, and other conveniences to further the objects of its connections. Each railroad whose road is intersected by any other railroad's new road shall unite with the other railroad to form such intersections and connections, and grant such facilities. If the railroads cannot agree upon the amount of compensation to be made, or the points and manner of the crossings and connections, the issue shall be determined by the circuit court. But no railroad which obtained a right of way and constructed its road at the point of intersection, before the application for such determination to the court was made, shall be required to alter the grade or change the location of its road.
SDCL 49-16A-51