How to make spline for pathfinding

I’m using spline to make road but when I make it usable for nav it take both the spline and the landscape, how do I restrict it to my splines ?