1

I need to find all pixels with a certain value and create a shapefile from those locations. Any idea how to get started ?

  • Do you want points at the center of the pixels or polygons composed of adjacent pixels? – Logan Byers Feb 22 '17 at 15:54
  • ideally points at the center of the pixels. – fpolig01 Feb 22 '17 at 15:58
  • @fpolig01 A single value or a range of values? – mgri Feb 22 '17 at 16:32
  • @mgri a single value – fpolig01 Feb 22 '17 at 16:33
  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our faq. – underdark Feb 22 '17 at 19:01
2

You may use a simple workflow (a bit annoying, but it could be easily implemented in the QGIS Modeler if you need to perform it for several values).

1) Generate a grid of points

Generate a grid of regular points centered on the pixel centroids of your raster. You may use the Regular points algorithm from Processing:

enter image description here

  • The first parameter is the extent of your input raster (you may select it from the ... button on the right);
  • The second parameter is the size of your input raster (you may select it from the ... button on the right): enter image description here
  • The third parameter is the half of the size of your input raster (you may select it as above, but remember to divide the size by two).

This will be the result:

enter image description here

2) Add raster values to points

Use the Add raster values to points SAGA tool from Processing (it doesn't need more explanation).

3) Extract the point of interest

Use the Extract by attribute algorithm from Processing and select the value you need (in my example, equals to 1880):

enter image description here

4) Enjoy

enter image description here

| improve this answer | |
  • 1
    Great! Thank you for the detailed explanation. Exactly what I wanted. – fpolig01 Feb 23 '17 at 13:18

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.