I have data on different populations and I need to get the elevation values for each population from the main river in the study area. I have 3 datasets: populations (polygon shp), dem (raster), river (line shp). Using "zonal statistics as table", I extracted elevation values from sea level. However, I am interested in getting elevation values relative to the main river. Any suggestions?