Aligning the instanced spline mesh to the landscape ground

Hello everyone!
Do you know how we can align an instanced spline mesh to the landscape ground, so the spline can follow hills and valleys of the landscape?!
Also is there a way to import the spline path for an instanced spline mesh from a vector file?!

I appreciate your thoughts!