0

I have raster data of NDVI and DEM I have already created contour from DEM. Now I'm trying to find following:

for each contour find the raster information within the contour.

Can anyone suggest available methods in GRASS?

I used r.mask and then v.what.rast it works. However, I got the ndvi values of the area that has been masked (NDVI values that lie inside the polygon plus the outside area) [image -1] https://i.stack.imgur.com/NMNlm.jpg

Actually, I need NDVI values that lie inside the contour/polygon [image-2] https://i.stack.imgur.com/A2YWl.jpg

I may actually need to intersect each contour with the NDVI and extract the NDVI values (inside the contour).

  • Please edit your question to include details of what you've tried. Where exactly are you stuck? What "raster information" are you trying to find? Do you want to intersect each contour and extract the NDVI values? Do you want to get all the unique values for each contour? Do you want the average NDVI for each contour? At the moment, your question will be closed because you haven't provided enough details for us to give you a good answer. – Fezter Oct 19 '16 at 2:56
  • Just guessing, perhaps v.what.rast - Uploads raster values at positions of vector points to the table (grass.osgeo.org/grass72/manuals/v.what.rast.html) is what you need – markusN Oct 20 '16 at 18:31
  • Thanks @markusN .. I've used v.what.rast it works fine. However, I got the ndvi values of the area that has been masked (NDVI values that lie inside the polygon plus the outside area) [image -1] i.stack.imgur.com/NMNlm.jpg Actually, I need NDVI values that lie inside the contour/polygon [image-2] i.stack.imgur.com/A2YWl.jpg – user1234 Oct 21 '16 at 1:32
  • In this case enlarge the computation region a bit, using g.region. It also supports relative bounding box coordinates management: grass.osgeo.org/grass72/manuals/… (4th + 5th example) – markusN Oct 22 '16 at 10:20
  • @markusN :I've used g.region and then v.what.rast but it uploads all values of the area. I need points that are within the polygon. [do I need to use g.region n=n+1000 w=w-500 and/or g.region n=s+1000 e=w+1000 but I don't understand it] g.region vect=contour_f_10316_10344_boundary_polygon -p projection: 1 (UTM) zone: 14 datum: wgs84 ellipsoid: wgs84 north: 5087624.94993913 south: 5087504.66614475 west: 688466.18147708 east: 688630.63290309 nsres: 5.01182477 ewres: 4.98337655 rows: 24 cols: 33 cells: 792 – user1234 Nov 2 '16 at 17:59
0

I would suggest having a look at either

In the manuals you find links to other related and probably relevant modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.