Hi Tiffany,
The method you've found to generate a point data layer of your slope values will result in a point data layer that should be identical to one you get using the R.TO.VECT tool.
The slope values generated when you create a slope raster data layer will typically have lots of decimal places as they will aim to calculate slope as precisely as possible. The selection you have currently run will select all the slope values below a certain threshold. However, if you want to select all the slope values within a specific band (e.g. 0.5 to 1 degree), then you would run a selection with the expression: Slope >0.5 AND Slope <1 (you can find the options for AND under OPERATORS in the FUNCTIONS list of the SELECT BY EXPRESSION window).
In terms of the values that you're getting, these look like they could be correct. You're very unlikely to get a 0 value for a point that falls within a cell of a specific slope value. This is because you are converting your slope values to a point that is placed at the centre of each grid cell. Unless your point also plots exactly at this central point, then you're not going to get a zero distance to the nearest point. You can identify which cells fall within a grid cell of the selected values by extracting the actual slope values (as you have done), and then creating a new field where you subtract the slope value for the grid cell a point falls in from the nearest slope value within a specific range. Any values with zero in this field will fall within a grid cell with the specified range, any other values will indicate that if falls in a non-selected grid cell.
If you wish to extract distances based on grid cells rather than based on Euclidean distances to the grid cell centre, then you can try the following work flow:
1. Convert your slope values into points (using either the R.TO.VECT. tool, or the method you mentioned below).
2. Select the points with your required slope ranges using the SELECT BY EXPRESSION tool.
3. Create a new point data layer based on the selected points using the SAVE AS tool.
4. Convert your selected points into a raster data layer using the RASTERIZE (VECTOR TO RASTER) tool (RASTER> CONVERSION> RASTERIZE).
5. Use the R.GROW.DISTANCE tool (PROCESSING TOOLBOX> GRASS COMMANDS>RASTER> R.GROW.DISTANCE) to generate a raster data layer of Euclidean distances to the grid cells with the required slope values.
6. Use the POINT SAMPLING TOOL to extract the grid cell distances to the point locations. This will give you zero values for any points that fall within a grid cell of a specified value, and will give you distances based on the centre of each grid cell to the nearest one within the specified range. Note, however, that this will give you binned distances values, with bins based on the grid cell size of your slope raster data layer, rather than a continuous set of distances. This may have implications for how you use these data in statistical analyses.
I hope this helps.
All the best,
Colin