Hi, I have altitude data in a raster and want to extract the altitude at a specific line. Like the sample tool but with a line instead of points, how do I do that?
A similar process to Dan's would be to convert the polyline to points using the Feature Vertices To Points tool. There are a variety of options for determining which vertices to convert (ie: All, Mid, Ends). Then proceed to use the sample tool with the points.
Please use Extract by Mask. If you run Feature Vertices to Points you won't be extracting all the cells underneath the line, unless you densify the line in advance to the resolution of the raster you wish to extract from. Extract by Mask requires no conversion in advance of the process and will save you time. The output will be just the pixel values underneath the line.
What is your desired output? Points, Raster, Table...