I have a simple raster with multiple pixels (5 million+), and each pixel has a value from 0-1 representing % values. So one pixel might be 0.361 (36%) and another might be 0.053 (5%).

Is it possible for GIS with something like a moving window to create polygons for me that have a specified value from the raster?

I wanted 3 polygons of a certain size (acres) where each has an average value of 70%. Each pixel in the raster is 1 meter.

I could do this manually in an iterative way by drawing polygons than calculating statistics, then re-drawing, but can GIS do it for me?

I am not technically familiar enough with GIS to know, and google has indicated that I might need to go about this in a round-about way.

  • Do you want 70% of cells inside each polygon to have value of 1 and 30% value of 0 or is it something else? Can these 3 polygons overlap? – FelixIP Aug 14 '19 at 1:33
  • @FelixIP, sorry the question perhaps was not clear enough, I will edit. The raster has a ton of pixels each with a value between 0 -1, representing percentages. So, one pixel might be 0.342 (34%), and another might be 0.0794 (7%). Yes, these polygons could overlap for my purposes. – emower Aug 14 '19 at 19:55

Multiple solutions possible to get your a very close result. If you can create 0.7 contour of raster, points on it are your best candidates.

Alternatively express your area in raster pixels and run focal statistics using relevant size window, e.g. 50*50 (not necessarily a square or rectangle) if your area is equivalent of 2500 cells. Use raster calculator:


or similar to find best matching candidates. Convert result to points and create your rectangles around it. There are multiple ways of doing it. Run zonal statistics using rectangles and original raster. You'll get something similar to this:

enter image description here

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.