2

I am summarizing some population data using a 1km raster overlay. I converted population data, polygon layer, into a 25-meter raster that contains the value for population/m^2. That value is then multiplied by 625 m^2 (the area of each cell), then I figured that I could do a zonal summary using my 1km raster layer (which is snapped nicely to the 25-meter raster layer), but now I am stuck. If I could just add up the values of each 25-meter cell that occurs in a 1-km cell then I would only need to multiply by 625 to get the approximate total population in that cell... I could use a majority resample but this should give a better estimate.

I got some great advice on coding a solution, but I'd like to figure it out along this line of thinking if possible.

  • I'll try that... I have a 1km fishnet that I'll union to the population data. – Jim Richalds Jun 21 '14 at 4:43
  • Well, I'd like to see if there is a raster based solution. I'm still working on the union solution. – Jim Richalds Jun 21 '14 at 8:41
  • Hi @ChrisW, the zonal statistics tool will perform the sum quite well; I'm not sure how to export the sum raster to a table. I don't think tools like frequency or summary statistics can take a raster input. Do you know how to do tabulate the values in a raster? If so it's a much better way than Union with polygon, provided it's a tool (or group of tools); if it needs programming I'd still be interested. – Michael Stimson Jun 22 '14 at 0:35
  • Thank you @ChrisW, that's another new thing I've learned from you. Could you put that in as an answer as it's a better solution than the one I wrote. – Michael Stimson Jun 22 '14 at 7:21
  • 2
    Block statistics is an attractive solution for its simplicity and speed. – whuber Jun 23 '14 at 20:12
3

If you want to stay completely in raster it would be nice if Resample had a Sum method, but as long as you have Spatial Analyst available Zonal Statistics should be able to solve your problem.

If using another raster for your zones, each zone (which will be each cell in this case) needs a unique value. Are all 1km cell values the same? If so, you'll need to alter the raster and/or add a Raster Attribute table. Alternatively, rather than use a raster for zone input, you can just use your fishnet (assuming it's polygons). See the Zonal Statistics help link above - there are several considerations for the raster or vector used for zone definition (cell size, snap, number of bands, presence of a Raster Attribute table, etc.).

The resulting output should be a 1km cell raster with each cell the sum of your 25m raster cell values. You can then run this output raster through Raster Calculator for your [625 x each cell] operation for a final summary raster.

If you want to work in tables, there is also the Zonal Statistics as Table tool which creates a table rather than a raster output. Note that both it and creating a Raster Attribute table already summarize identical cells as single records in the table with a frequency count, not individual cell records. If you want a table with each cell as a record (assuming they aren't already all unique values) you can refer to How to get values of each cell in raster attribute table?

1

You already have your overlay polygons, now turn your data raster into polygons using raster to polygon, select 'no simplify' and your polygons will match exactly to your cells. There are limits to the size of a raster that can be processed as the intermediate shapefile must be less than 2GB for any of the files; Due to these file limitations you could batch the poligonization by using extract by mask and selecting halves or quarters of your overlaying polygons as the mask. This approach will also speed things up as each batch can be done simultaneously with multiple instances of ArcCatalog.

Prior to performing the union it would be best to use Integrate to minimize/alleviate slight mismatches between the polygon layers which would result in sliver polygons. Be sure to read the cautions on this tool and keep a backup; with overenthusiastic parameters it can destroy good data.

Union each portion in turn with the overlaying features; Union is limited to two feature classes with basic or standard license levels which should be fine for this operation. After the union all the values from the overlaying data and raster will be present, to summarize this use summary statistics with a case field of the important attribute(s) from the overlay and sum of the raster attributes.

Note: this process will work equally well if you perform it on points generated from the raster unless you need an overlapping polygon area, in which case integrate would be more detrimental than beneficial.

  • The method put forward by @chrisw is better, no raster to polygon conversion required and therefore can be performed on a much larger dataset. Do it that way unless you have irregular polygons and need to calculate the intersecting area. – Michael Stimson Jun 22 '14 at 22:16

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.