collect cell values from a stack of rasters

3625
5
04-27-2015 01:39 PM
RamB
by
Occasional Contributor III

Hi,

 

I have about 300 rasters (IDW surfaces). I would like to collect all the cell values located under a cell from all the cells below in this stack of 300 rasters. All rasters are same extent and same cell size.

 

For example we have 5 rasters. I have a polygon layer that exactly overlaps the raster (actually created using raster to feature tool) . Lets assume a polygon(cell) location in this polygon layer, below this polygon are 5 rasters and hence 5 cells.

 

I want to store these 5 cell values as attribute of the polygon cell, so that the attribute table for this particular polygon cell reads (3,10.4, 8.9,2.3,1) These are the cell values of the cells from the rasters below.

 

How can I do this?

 

thanks,

Sriram

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

in raster world on a cell by cell basis there is the local toolset  specifically the cell statistics toolin the raster/vector world there is the Zonal Statistics toolset  Both don't return what you want, since they return the statistics on a cell-by-cell basis, specifically

available statistics are Majority, Maximum, Mean, Median, Minimum, Minority, Range, Standard Deviation, Sum, and Variety

you want the data from which these values are derived.  the Combine tool could work if each zone was a cell (which is unlikely), but you are limited to 20 input rasters...soooo you are left with coding a solution using RasterToNumPyArray and working with the arrays in Python.  And working with an n*m*300 array could raise other issues.  You may have to parse the work flow into manageable steps.

Any further information as to your end result would help.

0 Kudos
RamB
by
Occasional Contributor III

Hi Dan,

Thanks for your response. Basically it is weather Data from weather stations. I am interpolating using IDW for other places in the area. So I have 365 days (rasters).

I want to use this data in another simulation software, but loading 365 rasters is too hard on that software. But that other software can handle a polygon with 365 values ticking through each simulation step. So if somehow I can manage to get a polygon layer with 365 values in a field storing that attribute, I am good to go.

Hope this helps?

thanks

Srirama

0 Kudos
KishorGhatage
Occasional Contributor III

You can try following steps:

1. Create a point layer which will have point for each cell. You can use raster to point tool.

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

2.  Use Extract multivalues to point tool which will extract values from rasters

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

3. finally use spatial join to join the cell values to polygon from point or if the simulation software can use point data then directly you can use it.

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

I have worked with upto 10-12 rasters using Multivalues to point tool however I am doubtful if it will work for 300 raster. If not you need to run it for small set of rasters or you need to write a small python script to iterate the 300 rasters and extract the values to points.

Hope this helps

Kishor

0 Kudos
RamB
by
Occasional Contributor III

Hi Kishor,

Thanks for the details. Yes, I am thinking likeswise. Learning to do a model builder. Let me see if i succeed. Thanks anyway.

thanks

Sriram

0 Kudos
KishorGhatage
Occasional Contributor III

Hi Srirama,

Using model builder would a good and simple approach to accomplish this task. Use Extract values to points tool in model. Your model would look like this.

0 Kudos