1

I would like to extract the pixel value and coordinates of each of them from a ndvi raster layer. I don't have a point layer from where I can extract those values, as I read in other posts. Specifically, in this experiment I have a ndvi image from a vineyard field and I want to discretize the different treatments that we applied on this field. To do so, int he first place I want to get the pixel values and their coordinates (E,N), not the whole layer but from some parts that I selected by creating a polygon.

8
  • What have you tried so far?
    – Erik
    Oct 18, 2019 at 7:41
  • Also, which software are you using?
    – Erik
    Oct 18, 2019 at 8:00
  • Hello, thanks for your reply. I am using QGIS.
    – Ange
    Oct 18, 2019 at 9:05
  • Up till now I have individuated my wine rows by drawing a polygoin and then I extract my raster layer by mask. Here si where I want to extract pixel values and their respective coordinates but I don't know how. I was looking for information but just found out examples with points sampling. Thanks in advance
    – Ange
    Oct 18, 2019 at 9:07
  • Hello, maybe you could reclassify your raster to create some classes and then extract the polygon's coordinates for each class?
    – geoSAM
    Oct 18, 2019 at 9:26

1 Answer 1

0

If you have a polygon of interest you can:
1. Create a grid of points inside your polygon by using Regular Points from your toolbox and setting the input extent to your polygon's extent and the point spacing as you wish.
2. Take the values from your raster by using the Sample raster values with input point layer your regular points layer.
3. Add geometry columns to your point layer by using Add geometry attributes.

1
  • 1
    Thank you very much, I am going to try this!
    – Ange
    Oct 18, 2019 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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