I have a rasterlayer with stratified landcover (4 different classes) and have created random points (study sites) in each strata class (using R). My problem is now that I want to snap these points to the nearest road but make sure that the strata is still the same. So not only snap to nearest line, but nearest line, that falls within a similar stratum as the point. I know of the near tool, but I cannot see that this tools makes sure that the strata stays the same for the snapped point. I have the strata raster layer, a shape file with the different points and a polyline layer with roads. Does anyone have any ideas – is this even possible in ArcMap or do I need to consult R again? I have ArcMap 10.1 with a standard license.