>Not sure what your overall goal is here. (Won't the slopes along the coastline >all be about 0?). If there are >two adjacent points with different slopes from >the raster, which value would you want to attach to the line >segment between >those points?
I am trying to assign a general raster slope to a segment of coastline that is representative of the steepness of that roughly 100m2 raster pixel. Yes, technically the slope is 0 at the waterline, but what we are trying to assign to the vector shoreline is a slope value that is more representative of the backshore, to give an idea of how sensitive the coastline might be to sea-level inundation and erosion. I was able to assign the raster slope to the vector points using v.distance, but getting the slopes onto the coastline line vector with a spatial join seems to be very difficult if not impossible in Grass. As for the problem of which of two points to assign to a vector line segment, I thought there might be a function to choose the median value of the two points, or some other statistic – ArcGIS provides a way to do this through their spatial join module. >But you could approach the task in a different, more straightforward way: >Run the module v.split on your original coastline line vector and split to >segments at whatever max distance >you choose, Then run v.rast.stats with that >split line as input and use your slope raster to derive slopes. The >result >will be an attribute table attached to the coastline vector with min,max,mean, >etc raster values for >each line segment. Your method is interesting, I would like to try that on a sample section and see how the processing time compares to the v.distance method. Since I am working with the entire coastline of Canada, I don’t think I will have time to rerun the process with v.rast.stats. I might take several weeks just to complete the v.split portion. Thanks for the ideas though, ~ Eric. On 03/06/2018 06:02 PM, thepatton...@gmail.com<mailto:thepatton...@gmail.com> wrote: I have a high-resolution vector coastline, and I extracted the vertices of this coastline to points using 'v.to.points use=vertex'. I am trying to find the nearest raster slope value from another map to these points, and then upload this slope to the attribute table of the vector points coastline. To do this, I converted the raster slope map to points with r.to.vect, and successfully uploaded the nearest slope value from the now vector slope map to the vector points coastline with v.distance, using a dmax=200. Ok, now to my problem: I want to get the vector coastline points back onto the original vector *lines* coastline, with all the point attributes as well. Since the vector coastline points were derived from the vertices of the coastline map in the first place, they are spatially coincident, but I can't find a processing method that does this. Ideally, I suppose the coastline points map could act as breakpoints to the coastline polyline map, and the attributes would be transferred based on a buffer of something like one metre or less. Any ideas on how I might do this? Thanks, -- Eric _______________________________________________ grass-user mailing list firstname.lastname@example.org<mailto:email@example.com> https://lists.osgeo.org/mailman/listinfo/grass-user -- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918
_______________________________________________ grass-user mailing list firstname.lastname@example.org https://lists.osgeo.org/mailman/listinfo/grass-user