Calculate range of pixel values under larger pixel of another raster

1556
6
Jump to solution
11-18-2017 11:08 AM
Madan_KrishnaSuwal
New Contributor

Hi, 

I have two raster, Raster1 ( ~1km resolution ) and Raster2 (90m resolution). There are about 100 pixels of Raster2 under a pixel of Raster1. I would like to calculate range (max-min) of those 100 pixels of Raster2 for each pixel of Raster1.

I tried zonal statistics, which accumulated the range values for each value of pixel NOT for each pixel, which I don't want. 

I appreciate any clue how to do this. 

Many thanks in advance. 

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

You should use Aggregate—Help | ArcGIS Desktop  (or Aggregate—Help | ArcGIS Desktop for ArcMap) to create new rasters with the 1km pixel size applying MIN and MAX as aggregation type which will be applied to the 90m pixels covered by each 1km pixel.

View solution in original post

6 Replies
XanderBakker
Esri Esteemed Contributor

You should use Aggregate—Help | ArcGIS Desktop  (or Aggregate—Help | ArcGIS Desktop for ArcMap) to create new rasters with the 1km pixel size applying MIN and MAX as aggregation type which will be applied to the 90m pixels covered by each 1km pixel.

DanPatterson_Retired
MVP Emeritus

Zonal statistics as Table  if the smaller sized pixels are within the larger sized pixels... there is a 'range' value in there when you add a field and subtract.... max - min

0 Kudos
XanderBakker
Esri Esteemed Contributor

The OP mentioned stat Zonal Statistics does not work since values of pixels in 1km raster repeat and the statistics for each pixel is required. Aggregate allows you to do this, although you will need to run MINIMUM and MAXIMUM separately and use Raster Calculator to calculate the difference.

DanPatterson_Retired
MVP Emeritus

Regiongroup first, is what I normally do first, if there is any chance of duplication of zones (akin to multipart to singlepart in vector).  I don't like multipart anything and rasters do this by default.  So if the 1km raster values repeat, I would instinctively regiongroup before I proceeded (if I was using SA and not arrays anyway.)

I suggested  ZonalStatisticsAsTable for this reason  the ambiguity issue is mentioned in the help files.  Plus the multipart nature of a 'zone' can lead to different results for 'majority' and 'minority' since distinctly separate areas belong to the same zonal class may not exhibit similar properties because of the zone aggregation

....."or majority and minority calculations, when there is a tie, the output for the zone is based on the lowest of the tied values"...

I generally don't like zones or multipart anything unless you know what you are dealing with, but it may be a workflow preference

0 Kudos
Madan_KrishnaSuwal
New Contributor

Thank you Xander and all. 

it is solved now.

As suggested by Xander, I used the  Aggregate tool to evaluate minimum and maximum first, then I used Raster calculation to calculate range (Max - Min). 

Appreciate your time. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

Do try a comparison in case you have multipart zones since the mins and max values can differ between them. When you have time

0 Kudos